From: Pavel A. on
"Alex Blekhman" <tkfx.REMOVE(a)yahoo.com> wrote in message
news:u5gKspsvKHA.5812(a)TK2MSFTNGP02.phx.gbl...
> Well, MS server censored my previous post for whatever reason.

no, it's visible on nntp.
-pa


From: Ben Voigt [C++ MVP] on

>> > the naive approach would be: set a (global) variable inside the
>> > callback, and periodically check it inside
>> > "perform_a_long_operation"; however we cannot use this pattern,
>> > because this last function is read-only for us.
>>
>> Just as you can't inject a "check for boolean flag" statement into the
>> function, you can't inject a throw statement into it.
>
>
> maybe we can alter the thread program counter from outside...

While the thread is suspended, I hope. In an era of multicore CPUs, just
because your thread is active doesn't mean the other thread isn't also
executing.



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4933 (20100310) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com



From: Kenneth Porter on
Mycroft Holmes <psion.s5(a)gmail.com> wrote in news:27ef92c2-dfba-4293-877d-
fa6ee1b037c2(a)y11g2000yqh.googlegroups.com:

> the naive approach would be: set a (global) variable inside the
> callback, and periodically check it inside
> "perform_a_long_operation"; however we cannot use this pattern,
> because this last function is read-only for us.

Is the function known to be exception-safe? This has all the same risks as
killing a thread instead of having it gracefully exit. Resources may be
left allocated or in a "dirty" state.
First  |  Prev  | 
Pages: 1 2
Prev: problem with bind
Next: Binary Diff Utility