From: Sahananda (J. W. <sah...@wi...> - 2011-03-18 15:30:41
|
I'm sorry to reopen this long dead thread. One of the blocks to my adopting 4.1 is this problem we discussed last May. Mark & Rony both sent me some sample code. I tried to implement Ronys server, and after some diffculty, I stripped it down to it's bare bones and tried to get it to work in the abstract, before applying it to my own particular problem. I have uploaded a script testthread.rex with the results of my attempt. However, I seem to have two problems with it still. Firstly, although the server succesfully despatches the first message I send to it, it never seems to return. I confess I do not fully understand the guarding, but my understanding is that whilst guard is on, the method with guard on continues, but any other method attempting to access variables within that methods scope has to wait. Secondly, I know I have to stop the server somewhere, and in the test code, I have just stopped it at the end. I think it should be stopped in the uninit class method of basetask, but that doesn't seem to work (maybe because of the problem above). It may be that I am making a mistake that is obvious to more experienced eyes. Any chance that you could take a look please. thanks, Jon On 1 June 2010 07:42, Rony G. Flatscher <Ron...@wu...>wrote: > Hi Jon, > > On 01.06.2010 07:55, Sahananda (Jon) Wolfers wrote: > > Happiness is proving to be a little more ellusive than that. > :) > > > Rexx\SQL is thread-safe as of Version 2.5 where the Database client > > software is thread-safe. > This is good. > > > Rexx\SQL reports whether the client is known to be thread safe by the > > variable SUPPORTSTHREADS. > > SUPPORTSTHREADS is 1 where the client is known to be threadsafe and 0 > > where it is not. > > In my case the variable SUPPORTSTHREADS is set to -11 :-( > Even if the database does not support threads you may still run your > ooRexx app in multiple threads as long as you make sure that the > interaction with the RDBMS is carried out by one worker thread only > ("serializing access to the RDBMS"). > > > I have submitted a bug report to Mark although I think it is probable > > that Rexx\SQL is just reporting what the libMySql.dll returns from > > it's function mysql_thread_safe(). > > > > It may be that upgrading MySQL from my current version (5.1.30) to the > > latest general release version 5.1.47, will resolve this, but a MySQL > > upgrade is not always a straightforward matter (they keep adding new > > reserved words). > Researching that corner a little bit it seems that MySQL can be compiled > with and without thread support, such that you would need to research > how your versions of MySQL got compiled. > > Regards, > > ---rony > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Oorexx-devel mailing list > Oor...@li... > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > |