#166645 - 2006-08-31 06:41 AM
Multithreading and pointers
|
It_took_my_meds
Hey THIS is FUN
Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
|
Hi Ruud et. al., I would like to see the ability to spawn threads as well as create pointers. I guess the threading syntax could be similar to that in Perl. The pointer syntax could be something like
Code:
$var = "Test" $pointer = /$var $var = \$pointer ; equals "Test"
Cheers, Richard
|
Top
|
|
|
|
#166646 - 2006-08-31 06:56 AM
Re: Multithreading and pointers
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
richard, pointers are in the wishlist already as it has been asked many many times. good to see that ppl still keep voting for it. not sure about your syntax though
threading syntax can be left open as pointer syntax may interfere with it. nonetheless, awesome post.
thanks. just hope Ruud reads this on good day
|
Top
|
|
|
|
#166647 - 2006-08-31 07:46 AM
Re: Multithreading and pointers
|
It_took_my_meds
Hey THIS is FUN
Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
|
Thanks Jooel. I have certainly seen posts by people wanting to pass to by reference but haven't seen anyone mention pointers directly. I guess what I was trying add was that I would prefer the syntax of creating a pointer rather than using ByRef and ByVal in functions.
As for spawning threads, this would be very useful especially for KiXforms apps. I would love to be able to keep the GUI from freezing when waiting for long running external calls.
|
Top
|
|
|
|
#166650 - 2006-08-31 09:51 AM
Re: Multithreading and pointers
|
Richard H.
Administrator
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Forking a process or starting a new thread is an interesting idea. I have a server monitor script that RUNs a new KiXtart instance for every server polled - it would have been much easier to implement with Fork().
We'd probably need some some of inter-process communication for data exchange and latches for process control, but that's not such a bad thing. The really hard bit would be ensuring that all the libraries that KiXtart uses are thread safe which might mean dropping some of the older versions of Windows from support.
For a full implementation it would be nice to have signalling, trapping and error handling ("events"), but can probably get around most of that with IPC.
Quote:
For example there is currently no way to start a child form that is populated by a long running query to a DB and still use the parent form while the DB query is running.
If you know of a way then please let me know!
Use an asynchronous ODBC query. You initiate the query then poll the object to see when it has finished.
|
Top
|
|
|
|
#166651 - 2006-09-01 01:57 AM
Re: Multithreading and pointers
|
It_took_my_meds
Hey THIS is FUN
Registered: 2003-05-07
Posts: 273
Loc: Sydney, Australia
|
Thanks for the tip reqarding asynchronous queries.
|
Top
|
|
|
|
Moderator: Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart
|
0 registered
and 514 anonymous users online.
|
|
|