× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Fri, 4 Mar 2005 02:40:54 -0700 (MST), James Rich <james@xxxxxxxxxxx> wrote:
> On Thu, 3 Mar 2005, Steve Richter wrote:
> 
> > On Thu, 03 Mar 2005 20:25:28 -0600, Vernon Hamberg <vhamberg@xxxxxxxxxxx> 
> > wrote:
> >> We must be talking different things here - VB for the longest time did not
> >> have thread capability, yet was considered event-driven. So you must mean
> >> something different.
> >
> > for event driven programming you need a message loop. Every windows
> > program has, at its heart, a message loop.  The Windows OS feeds
> > events like a keystroke, mouse move, a command to close the window to
> > the windows message queue.
> >
> > on the 400 you dont have that default message loop.  If you want to
> > use an event model for your interactive job you need threads to
> > implement the whole thing.  The main thread would receive from the
> > message ( data ) queue, processing the events.   Other threads would
> > feed events like "the user has pressed the enter key", a socket
> > receive has returned some data,  a physical file trigger has fired
> > because a record has been added to a file.
> 
> You don't need threads to implement event driven programs.  Indeed,
> multi-threaded events driven programs are a relatively recent development.
> X11 didn't start using threads until R6 IIRC (R6 is the current major
> release).  x5250 (an X11 5250 emulator I wrote) is event driven and does
> not use threads.  I would guess that the majority of event driven programs
> do not use threads.  All is needed is a multiplexing function such as
> poll() or select().  There is no technical reason why an event driven
> program couldn't be written on the AS/400.  Joe's idea of using data
> queues would work.

If you want your interactive job to implement the event model on its
own, you are going to run situations where you need multiple threads. 
What if you do something really crazy like use a socket connection to
a PC to prompt the user with a message box?   How do you get the event
of the user clicking the OK button on the message box signaled back to
your interactive program?   The best way to do this is to create a 2nd
thread and have that thread handle the socket back and forth with the
PC program that is prompting the message box.

The problem is that IBM does not allow multiple threads in interactive
jobs. So, staying on topic of this conversation, I am suggesting that
IBM spend part of this $1 billion new marketing windfall on basic
improvements to OS400.

-Steve

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.