How to start a callback on another thread ?

Using (or providing) Microsoft.NET Classes

How to start a callback on another thread ?

Postby PGilbert on Mon Mar 28, 2016 12:30 pm

It is possible to start an event on another thread while using ⎕WS:

      ⎕WS 'Event' 'Select' 'DoIt&'


While using .Net, the following will not work:
      ⎕USING ← 'System.Timers,System.dll'
tm1 ← ⎕NEW Timer(1000) ⍝ 1 second
tm1.onElapsed ← (⎕OR 'DoIt&')
tm1.Start


One way in .Net would be to call a dummy function first that will call the event on another thread. Is there another way ?
User avatar
PGilbert
 
Posts: 436
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Return to Microsoft.NET

Who is online

Users browsing this forum: No registered users and 1 guest