Calling a platform function on another thread
The PlatformFunction class' coroutineCall methods enable you to call an external function in several ways:
On the same thread as the calling program
On a new, separate thread
On a specified separate thread
To spin off a new thread for the function call, omit the threadKey argument. By default, the coroutineCall methods cause the external function to run on a new thread.
platformFunction
coroutineCallWithArray:
(Array with: AtmQuery with: atmStruct).
To run the external function on a specific thread, specify a value for threadKey. The value you specify should be an object that you can use in future calls to specify the same thread again.
"Call a platform function on a separate thread."
aThreadKey := #myThreadKey.
"Call a platform function, specifying a thread key."
platformFunction
coroutineCallWithArray:
(Array with: AtmQuery with: atmStruct)
threadKey: aThreadKey.
"Call a platform function, reusing the same thread."
platformFunction
coroutineCallWithArray:
(Array with: AtmQuery with: atmStruct)
threadKey: aThreadKey.
Last modified date: 01/29/2015