I don't know how to explain the issue shortly, if you are not familiar with
what state machine means. And if you do, I'm not sure what to explain
further.

However, here is practical answer to your problem. Gambas itself doesn't
need to be multi-threaded to achieve such things. You can simply use
keyword Task to fork your program or write the program as two separated
programs and make them function as one via pipe. This gives you essentially
multi-threading.



Jussi

On Fri, Jun 1, 2018 at 1:12 AM, Steve G via Gambas-user <
gambas-user@lists.sourceforge.net> wrote:

> I don't think I understood your reply or maybe there was no reply. If
> there was a reply then I'd love to hear your ideas on how to take care of
> this issue. Without threading.
>
> ⁣Sent from TypeApp ​
>
> On May 31, 2018, 13:37, at 13:37, "Benoît Minisini" <g4m...@gmail.com>
> wrote:
> >Le 31/05/2018 à 23:27, MacGyver via Gambas-user a écrit :
> >> I will give you a real life example of the need for multithreading.
> >>
> >> project to monitor status of computers on a network. this is done
> >with a
> >> ping to each system from a timer. the result is either online or
> >offline
> >> depending on ping results. The program is unresponsive to the user
> >while
> >> multiple pings are done in the background. multithreading would allow
> >the
> >> program to be responsive to users while other computer status is
> >checked in
> >> another thread. furthermore if for some reason a person had 100
> >systems to
> >> monitor on the network, this will take time if many are in offline
> >status
> >> leaving the program unresponsive to users for quite some time.
> >creating 100
> >> threads each pinging only one system then terminating after returning
> >the
> >> result would make it even faster as all pings are done
> >simultaneously.
> >>
> >> So there is but one real world application for multithreading. not to
> >> mention it would make gambas immensely more powerful.
> >>
> >
> >"A Computer is a state machine. Threads are for people who can't
> >program
> >state machines." - Alan Cox.
> >
> >:-)
> >
> >--
> >Benoît Minisini
> >
> >-----------------------------------------------------------
> -------------------
> >Check out the vibrant tech community on one of the world's most
> >engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> >_______________________________________________
> >Gambas-user mailing list
> >Gambas-user@lists.sourceforge.net
> >https://lists.sourceforge.net/lists/listinfo/gambas-user
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to