On Fri, Apr 13, 2018 at 6:00 PM, Erich Steinböck <erich.steinbo...@gmail.com
> wrote:
> What I did for Windows with the separate thread should be easily adapted
>> for Linux
>
> I've rewritten the Linux handler with separate threads for INPUT and ERROR
> (if requested), while handling OUTPUT in the main thread.
> I'm just starting the first tests, and I've got a few questions.
>
> - How do I wait for SysThreads to terminate? Or check if they're still
> running?
>
> For the Windows version, I called terminate on the thread object that will
clean things up.
>
> - Can I raise an exception from within the dispatch() method (if I
> have the appropriate exit context available, of course)? I'm asking,
> because your code delays raising the exception until after terminate()
>
> No, you can't. The context objects are tied to the thread making the call
to the handler. You also cannot call the ioContext methods from the Error
thread. It would have to hold any data read and then have the main thread
handle it at the end.
> - An io context just provides those new redirection functions, and not
> on top everything what an exit context provides, right?
>
> Correct
>
> - My (yet completely untested) code issues a message "terminate called
> after throwing an instance of 'NativeActivation*'" - haven't ever seen that
> before (I of course assume this due to my own bugs)
>
> You must have tried to raise an error on other than the main thread.
There's no backing ooRexx code there to handle the error. All callbacks to
the interpreter need to happen on the main thread.
Rick
>
> -
>
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel