$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Ulrich Eckhardt (doomster_at_[hidden])
Date: 2008-01-23 12:43:44
On Wednesday 23 January 2008 04:16, ç³åå¹³ wrote:
> We can create a thread very easily. While, I donât know how to suspend and
> then resume it.
Just to elaborate on Frank's response, there is a reason this is not directly
supported. The problem with simply suspending a thread somewhere in the
middle (i.e. somehow settings its timeslice to zero) is that it might just be
in the middle of malloc() with a lock around the heap held. Any other thread
would then block on malloc(), possibly forever. Therefore, stop the thread in
a controlled state using a condition.
Uli