Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I can't reply to your comment to this. Pretty much everything I do at work involves communicating with resources which may block/crash so it wouldn't really be practical to put everything in a single while loop. It sounds a little bit to me like you're re-inventing the wheel - multi-threading means you don't have to go to the pains of breaking your long-running tasks up into pieces, the infrastructure takes care of that for you. I'm not trying to convert you, it sounds like you're perfectly happy and successful working in a single threaded environment. It just sounds like you're doing quite a lot of work to avoid multiple threads, which really aren't that difficult to manage.


... and then you have to deal with all the concurrency and blocking issues that come with outsourcing your timeslicing.

Timeslicing isn't hard. It's even simpler if you're the one writing the code.

If you are in the horrible position of having to interface with blocking/crashing code though, great shame :(


One of the big pains of my work day is our accounting system which, while being great at what it does well, can be abysmally slow to respond to queries (the simple question of how much of X do we own now, takes it around three minutes to answer...). We know from experience though that internally it can deal with up to three requests at a time without it slowing down. If I only had one thread then three requests (which block) would take me nine minutes to process, with three threads I can get all the results back in three minutes.


Interfacing with a broken bad interface is never fun. But perhaps fix the problem instead of working around it and letting it spread...


Unfortunately that's not practical, it's third party software and at least the last time we checked there wasn't a better alternative with the same functionality.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: