Re: ^R / ^D and threads
RenИ Clerc wrote:
: * Andrew W. Nosenko <awn@xxxxxxxxx> [12-11-2003 14:48]:
:
: > : Macros. ;-) Just unset resolve before doing your work on the
: > : thread, and set it again in the end of the macro.
: >
: > Don't work in generic case because you need not an "set it again in the
: > end of the macro" but "set it to the previos (set or unset) value" that
: > is impossible in the current implementation IIRC.
:
: Use 'toggle resolve'..
:
Inapplicable. "toggle resolve" just inverts value of resolve where we
need "save and restore" ability.
Let me to explain in the "pseudo-C" code:
What is needed:
{
bool original_resolve = resolve;
resolve = false;
some_work();
resolve = original_resolve;
}
/* As you can see, value of "resolve" before block is the same as
* value of resolve after block */
What is proposed by Thomas:
{
resolve = false;
some_work();
resolve = true;
}
/* As you can see, value of "resolve" after block is "true"
* regardless of original (before block) value. */
What is proposed by you?
--
Andrew W. Nosenko (awn@xxxxxxxxx)