Hi,

  Whenever I search on google for UI toolkits and multithread I got always
the same result, none of them are thread safe. Windows or Linux.

  Although the scripts can run in different threads (Windows or Linux) they
are using the same context to create elements and process messages. If this
is what you are doing, then I guess you will have problems even if it is
working in Windows now. The recommendation for multithread applications
(scriptable or not) is to keep UI code in the main thread always. This
seems to be a rule for any UI toolkits.

Best,
Scuri


On Mon, May 18, 2015 at 2:15 PM, John Spikowski <[email protected]>
wrote:

> On Mon, 2015-05-18 at 14:06 -0300, Antonio Scuri wrote:
> >   Hi John,
> >
> >
> >   I didn't understand what's not working in Linux.
> >
> When I start multiple Script BASIC thread based scripts containing IUP
> code from the host / startup script, I get Gtk / X11 conflicts.
> >
> >   If I understood it right DLLC is dynamically loading IUP DLL in run
> > time and creating the binding to ScriptBasic, right?
>
> Charles wrote the SB extension module in OxygenBasic and is Windows 32
> bit specific. His method works great and wish I could do the same on
> Linux.
> >
> >
> >   So you want something similar to Linux? How other libraries are
> > dynamically loaded in ScriptBasic, on Linux?
> >
> When I start a SB script as a thread, it has ALL the features and
> resources the main SB script has. It can use it's own ext. modules or
> share what has already been loaded by the host. All that is needed in
> that case is the DECLARE statement.
> >
> > Best,
> > Scuri
> >
> >
> >
> >
> >
> >
> >
> > On Sun, May 17, 2015 at 3:01 PM, John Spikowski
> > <[email protected]> wrote:
> >         Hi Antonio,
> >
> >         I joined the IUP mailing list and posted the below in hopes of
> >         finding a
> >         solution to my Linux threaded IUP needs. We have it working
> >         great on
> >         Windows 32 bit with the DLLC ext. mod. but that doesn't help
> >         me on
> >         Linux.
> >
> >         Do you have a C example for Linux using the approach suggested
> >         or
> >         something hidden in your magic hat?
> >
> >         John
> >
> >
> >         ------- Forwarded Message --------
> >         From: John Spikowski <[email protected]>
> >         To: [email protected]
> >         Subject: IUP multi-threading Linux
> >         Date: Sat, 16 May 2015 21:48:22 -0700
> >
> >         Hi List & Antonio,
> >
> >         I manage the Script BASIC project and a big fan of IUP. I
> >         recently
> >         enabled thread support on Linux (like the sbhttpd Script BASIC
> >         web
> >         server) and I'm trying to get IUP work under that environment.
> >         We have
> >         IUP working in a threaded model on Script BASIC for Windows 32
> >         bit with
> >         the DLLC extension module.
> >
> >         I read this post to list which is encouraging:
> >
> >         >
> >         Note that in GTK this is really easy to achieve:  GLib is
> >         thread-safe,
> >         and so you can simply call g_idle_add from your worker thread
> >         to
> >         register an idle callback.  The idle callback will then be
> >         called from
> >         the GTK main loop in the IUP thread (since IUP simply uses the
> >         GTK main
> >         loop, all this should work seamlessly without any modification
> >         to IUP).
> >         >
> >
> >         Does someone have a C example of this working?
> >
> >         Thanks for any help / direction you can provide.
> >
> >         John
> >
> >
> >
> >
>
>
>
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to