On Sep 28, 2006, at 9:55 AM, Alexander Cohen wrote:
On 28-Sep-06, at 10:43 AM, Jonathan Johnson wrote:
On 27 Sep 2006, at 21:15, Alexander Cohen wrote:
Heres the thing. I am using pthreads in a plugin and it calls
back into rb. I know, thats a no no but it does work if your
carefull. When it calls into rb, i need to set stackOverflow
checking to off. If i dont, i get a stackOverflow exception.
Problem is, i need to put that pragma into every functions that
is called within the thread. And here's the kicker... even the
function that are within a plugin.
my question does make sense though. Compile time or not, rb has
its own mechanisms for rb code pragmas and i need to access them
in a plugin.
All pragmas in REALbasic operate on the current method only, not
on a call-stack basis. This means that every method called from
your plugin, and every method called from those methods, etc, must
all have StackOverflowChecking turned off.
So how do i set that from within a plugin?
You can't. Pragmas affect how the compiler generates code. In this
case, stack overflow checking at the beginning of the method asks the
runtime if the current stack pointer has overflowed the stack. If the
stackOverflowChecking is disabled with a pragma, the compiler doesn't
generate that call. Because it is compiled in, there is no way to
affect this at runtime.
-Jon
--
Jonathan Johnson
[EMAIL PROTECTED]
REAL Software, Inc.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>