"Hwa Jong Oh" <
[hidden email]> wrote in message
news:8vu22d$5afp8$
[hidden email]...
> Do you think this the following methods useful(maybe harmful)?
>
> I made them because #resume #suspend should be used with care of not to be
> called more than once, which is unlike SuspendThread() ResumeThread() of
> MFC.
>
> Process>>suspendIfNot
>...
> Process>>resumeIfNot
>...
I think that two existing methods may already meet your needs:
Process>>suspendUnconditionally and Process>>resumeUnconditionally.
BTW: Be careful with suspending and resuming processes. Just as with
SuspendThread() you might suspend a Process in the middle of a critical
section (Mutex) and thus block other Processes. You should really only
suspend processes in a known state, and the best way to guarantee that is
for processes to only suspend themselves (i.e. by sending #suspendActive to
Processor). Bear in mind also that when a process is suspended, if there are
not other references to it, it will be garbage collected.
Regards
Blair