Platforms to show: All Mac Windows Linux Cross-Platform

Back to CallDelegatesMBS module.

CallDelegatesMBS.CallDelegateOnPreemptiveThreadMBS(m as _delegateMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Process MBS Util Plugin 23.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calls a delegate on a preemptive thread.

Experimental function to play with preemptive-threads in Xojo apps.

Some rules

  • No objects, no strings, no arrays
  • Use Ptr, not Memoryblocks
  • Crashes in debugger, so only use in built app
  • Use #Pragma BackgroundTasks False
  • Use #Pragma BreakOnExceptions False
  • Use #Pragma StackOverflowChecking False
  • Use #Pragma NilObjectChecking False
  • No exceptions
  • Delegate must be stored in global variable to avoid it getting freed early.
  • You can pass up to one ptr as data parameter.
  • Declares may work, but should be pre-used to make sure they don't raise an exception and are loaded.
uses thread pool on iOS, macOS and Windows. Otherwise regular threads.

See also:

CallDelegatesMBS.CallDelegateOnPreemptiveThreadMBS(m as _delegatePtrMBS, data as Ptr) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Process MBS Util Plugin 23.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calls a delegate on a preemptive thread and passes a ptr.

Experimental function to play with preemptive-threads in Xojo apps.

Some rules

  • No objects, no strings, no arrays
  • Use Ptr, not Memoryblocks
  • Crashes in debugger, so only use in built app
  • Use #Pragma BackgroundTasks False
  • Use #Pragma BreakOnExceptions False
  • Use #Pragma StackOverflowChecking False
  • Use #Pragma NilObjectChecking False
  • No exceptions
  • Delegate must be stored in global variable to avoid it getting freed early.
  • You can pass up to one ptr as data parameter.
  • Declares may work, but should be pre-used to make sure they don't raise an exception and are loaded.
uses thread pool on iOS, macOS and Windows. Otherwise regular threads.

See also:

The items on this page are in the following plugins: MBS Util Plugin.


The biggest plugin in space...