of course Pharo has an event queue, we call them announcements. That implies however that you want the code to execute as soon as something else happens. If you don't , fork and delay should be enough. With fork you dont need to wait for othet tasks to finish to execute your code, it will just put it to a thread and execute it concurently. If you want the code to run as soon as other tasks finish then of course you dont use fork.
On Mon, Oct 3, 2016 at 10:56 AM CodeDmitry <dimamakh...@gmail.com> wrote: > a JavaScript timeout is a function that takes a block and a period of time, > and after this period of time, puts the block at the end of the event > queue, to be executed as soon as the runtime is done performing the tasks > in > front of it. > > I am not sure if Pharo has an event queue, so it's a bit harder to do > it(since without one you can't ensure only one thing happens at a time, and > strange things can happen). > > That said, in simplest terms, imagine writing a clock app for Pharo, which > updates time every second, in JS this would be done by setting an interval > that ticks every 1000ms, and each time places the callback function(block) > at the end of the event queue. > > Related: https://www.youtube.com/watch?time_continue=1&v=8aGhZQkoFbQ > > > > -- > View this message in context: > http://forum.world.st/Intro-to-Microsoft-COM-for-Smalltalkers-tp4917738p4917835.html > Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com. > >