2006/12/28, Oleg Kobchenko <[EMAIL PROTECTED]>:
Threads and GUI are tricky no matter what environment is used. They need to be well understood in the context of the framework (Java or .NET) and the underlying operating system.
Right. However, with right model, concurrency made the problem easier to solve than harder. For example, I like the message passing style a la CSP(JCSP in java, stackless python, Erlang and etc). Declarative concurrency is one more nice model.
>From my recollection, in classic VB, threads were very hard to implement and it had to be done manually calling the win32 API. The same can be done in J. I would recommend exploring the possibility of creating a new J instance in the same process and start an OS thread
Okay. What do you mean by creating a new J instance in the same process?
on a callback allocated in that instance. See also - jasync at http://olegykj.sourceforge.net/ - invokeLater at http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/SwingUtilities.html - Overview of .NET multithreading http://www.yoda.arachsys.com/csharp/threads/
Thank you. I'll have a look at them.
--- Chris Burke <[EMAIL PROTECTED]> wrote: > June Kim wrote: > > The part, "in a separate thread or task" from User Manual read like I > > can achieve some sort of concurrency. What does thread or task exactly > > mean here? > > They have their normal meanings. You can run two separate J tasks at the > same time, but communication between them has to be programmed, as Dan > indicates below. > > >> You do have some options, though: You could write (e.g.) a VB > >> application that does GUI in one thread and interacts with J (via COM, > >> DLL calls, etc) in another. Or you could have several instances of J > >> running, communicating through sockets, (named) pipes, (mapped) files > >> or a combination thereof. > > >> What, exactly, are your goals? > > > > Suppose you wanted to add some feature to the plain Labs. While you > > are on one section, you can see a progress bar proceeding with the > > remaining time for the section constantly decreasing and finally > > advancing to the next with some message when the time's up. You could > > run J sentences in the ijx window and you don't want the progress bar > > to be unresponsive. > > > > I think using sys_timer could be a solution, like in javascript. > > However, it may get quite complicated and keeping the windows > > responsive is very hard. > > Labs are not good examples since they are intended to be run > interactively in the IDE. Stepping through a lab is just the same as > entering the sentences from the keyboard, and J will not run two > sentences at the same time. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
