[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is there an easier way to cancel threads???
- From: "D Burgess" <dburgess@...>
- Date: Sat, 29 Apr 2006 09:04:50 +1000
A little off topic. My apologies in advance.
Doug Rogers wrote:
Diego Nehab wrote:
>> [Now you know why I'm so fond about non-pre-emptive approaches.]
> Dude, it's not like LuaThread is my favourite child. :) I
> don't know why people like threads...
I have come to the conclusion that preemptive threading was created not
to support blocking calls but instead to support computer science
I am sure you will be requoted many times. IMHO the way around the
thread problem is have the OS handle the threading for you. IO completion
ports and overlapped IO do this on Win32. For once MS almost got it right.
There is, I believe, a few *nix implementations of IOCPs.
Anyways, the IOCP model should not be tough to emulate on *nix and
it solves a *lot* of thread/mutex nightmares (tremble/shake).