gdl icon indicating copy to clipboard operation
gdl copied to clipboard

there is no IDL_IDLBridge equivalent

Open ChunkyPanda03 opened this issue 1 year ago • 11 comments

I would like this feature however I don't think I could implement this

ChunkyPanda03 avatar Jul 13 '24 01:07 ChunkyPanda03

we are destined to only use one thread for all of eternity :cry:

ChunkyPanda03 avatar Jul 13 '24 02:07 ChunkyPanda03

@GillesDuvert was doing some work on this in purely idl/gdl I keep trying to use spawn but I just can't figure out a way to detach it from the main thread. I just don't think it is possible without writing some intermediary in C/C++ that handles the GDL instance what is your opinion on this?

ChunkyPanda03 avatar Jul 15 '24 03:07 ChunkyPanda03

@ChunkyPanda03 what IDL bridge?... As GDL is opensource, one does not necessary need one. Concerning SPAWN, I'm sure that /NOWAIT could be supported by GDL on all platforms with some work. People seem happy running many GDLs in parallel, eventually sharing common memory areas (although mmap is very recent and untested) . I understand that huge time-consuming data pipelines (sometimes unofficially :smile: ) use GDL in such manner.

GillesDuvert avatar Jul 15 '24 08:07 GillesDuvert

@GillesDuvert apologies I did not clarify IDL had a feature where you can automatically open another IDL interpreter in parallel this is known as IDL_IDLBridge, GDL lacks an equivalent feature (GDL_GDLBridge ?). This feature is great for obtaining multithreaded behavior in IDL. In my case I often need to do large analysis procedures which includes rendering png files which need to be off the main thread or the whole thing could take upwards of a couple days otherwise. This is also necessary in idl for window applications because the window will lock up if anything in the main thread is running.

ChunkyPanda03 avatar Jul 15 '24 19:07 ChunkyPanda03

here is a link referencing the idl feature https://www.nv5geospatialsoftware.com/docs/idl_idlbridge.html

ChunkyPanda03 avatar Jul 15 '24 19:07 ChunkyPanda03

Yessss, this would be nice to have!

On 15. Jul 2024, at 16:26, ChunkyPanda03 @.***> wrote:

here is a link referencing the idl feature https://www.nv5geospatialsoftware.com/docs/idl_idlbridge.html

— Reply to this email directly, view it on GitHub https://github.com/gnudatalanguage/gdl/issues/1857#issuecomment-2229226250, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOC5K6CB4SCO4HTGMBST4JLZMQO6FAVCNFSM6AAAAABKZ2U4CWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMRZGIZDMMRVGA. You are receiving this because you are subscribed to this thread.

brandy125 avatar Jul 15 '24 19:07 brandy125

interesting, and indeed useful --- probably just having GDL listen to external commands in its command loop , and adding a subprocess creation by fork() , plus some script for managing the IDL_IDLBridge object. Anybody interested? :smile:

GillesDuvert avatar Jul 15 '24 20:07 GillesDuvert

I sure am

ChunkyPanda03 avatar Jul 15 '24 21:07 ChunkyPanda03

nearly there... :smile:

GillesDuvert avatar Aug 01 '24 09:08 GillesDuvert

@ChunkyPanda03 @brandy125 please test #1870 linux only --- works4me in the simple case I have tested. BUT OK in DEBUG mode only -- optimization make interprocess hang IPC needs to be more robust ...

GillesDuvert avatar Aug 02 '24 16:08 GillesDuvert

seems ok now.

GillesDuvert avatar Aug 05 '24 08:08 GillesDuvert

Sorry got busy and missed this will have to give this a try

ChunkyPanda03 avatar Sep 03 '24 12:09 ChunkyPanda03

The current version MAY work. A better one using only POSIX messages is complete, needs to be made as a PR.

GillesDuvert avatar Sep 03 '24 17:09 GillesDuvert

@ChunkyPanda03 now would be a good time to test the last version with polished (?) Idl_idlbridge 😄

GillesDuvert avatar Sep 14 '24 15:09 GillesDuvert