nice! sometimes the solution is simpler than you think :) patient - if i do this it hurts, doctor - don't do it then
you could consider - check for locked resources after suspending the thread, resuming locking thread of necessary - a 'server' thread that other threads send messages to, a bit like a database server but for your imaginary app. - theres probably plenty of ideas to resolve/work around this if you search web On 21 September 2010 12:52, Steve Smith <ste...@collector.org> wrote: > > Imagine your thread has locked a major resource, now you suspend >> that thread. A instant deadlock occurs because that thread will >> never release that resource. >> >> Of course it will. It's called a bug. If I write moronic code, it > will cause problems, whether it's single or multi threaded. Using > this as a justification for the use or non-use of threads is like > saying you can't use divide because some muppet might try and divide > by zero and crash the code! > > I look forward to the day when my OS starts scheduling my application > using OnIdle events. > > -- > _______________________________________________ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >
-- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus