On 20 Nov 2013, at 20:58, Clément Bera <[email protected]> wrote:
> So what you are looking for is Process and semaphores. > > This is not multithreading in the default Pharo VM + image, currently our > semaphore/process management is not multithreaded, but executes all the > process in the same thread. What happens basically is that you will run > several processes in 1 thread with different priorities, and processes with > highest priorities will be executed first. This is very good for your case, > because if you put your task in another process with lower priority than the > UI process, each time you will trigger a UI interaction the secondary process > will be temporarily stopped to execute your UI interaction. > > (see #forkAt: Process userBackgroundPriority) One more thing: how do I synchronise? For example I want two async processes, but when they both finish I want to execute something. Eg. return merged data generated by processes. > > Seemingly there's no chapter about Process and semaphores yet but Stef is > planning to write one. > > The other alternatives are to use CogMT, a version of the Cog VM with real > multithreading for FFI (but I think it will not work easily with your case) > or the island VM plugin, which seemingly is an actor based multithreading > system in Squeak/Pharo (however there is only 1 project that successfully > uses it, which is the one of 3DICC). > > > > > 2013/11/20 Yuriy Tymchuk <[email protected]> > I’m not proficient in multithreading, but I think that I’m looking for > Semaphore and Process. Things that I implement take a very long time to run, > and I can’t do anything else during that time or even cancel them. So I guess > they should run in a separate process which I can achieve with #fork. But as > I start to work with that I want to know all the rest that can be useful. > > uko > > On 20 Nov 2013, at 19:21, Clément Bera <[email protected]> wrote: > >> Hello, >> >> What do you mean by multithreading ? >> Do you mean Semaphore and Process, Cog Multithreading, the Island VM plugin ? >> >> >> 2013/11/20 Yuriy Tymchuk <[email protected]> >> Hi everyone, is there any chapter on multithreading in Pharo books? If not >> maybe I’ll write something about that, but any material will be useful for >> me right now. >> > >
