![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello,
the application i'm currently building is doing a couple of things in parallel.Due to the lack of threading capabilities in Basic4PPC i found the timers to be a good replacement for the threads i'm using in the windows version of my application. During testing of my app it turned out, that the GUI code and the code running in 2 different timers does not real run in parallel.In fact, if the code within a timer needs to wait for something ( e.g. wait until an internet connection has been established) , the entire application is waiting. This makes me believe, that the whole executable is running in just one thread.When i read the docs, i did not find explicit references confirming this is true. I searched the forum and found a 3rd party threading library, which indicates indirectly, that Basic4PPC does not have the capability of parallel processing. My questions regarding this: - is it true: all codes runs in just one thread( even the timers)..? - is there any mechanism i could use to circumvent that, like OS Callbacks etc..? - is the 3rd party Threading lib the only way out of this..? I'm wondering why this matter is asked so rarely...have only a few people the need for doing things in parallel in their applications..? cheers TWELVE |
|
||||
|
Quote:
Quote:
Quote:
|
|
|||
|
Quote:
regards TWELVE |
|
||||
|
Quote:
You have probably noticed that, for simplicity and bug avoidence, Basic4PPC tends to only implement synchronous operations. Moving such operations onto a thread will effectively make them asynchronous as far as the main thread goes without having to resort to implementing asynchronous operations in custom written libraries for a particular application. However running B4PPC code on separate threads is only supported by optimised compiled applications as the IDE and legacy apps are bytecode interpreted at runtime and so would need significant modification to the interpreter to support multiple threads of execution. |
|
|||
|
Thanks agraham for your contribution to this topic ( and for your lib too..;-) ).I will start to test your threading library soon and hope, this can be a solution for me.
Do you know, how VS is handling this..? As from the documentation, VS is able to handle threads.Also for code it produces for the mobile devices...? kind regards TWELVE |
|
||||
|
Quote:
The threading library checks if it is running a compiled application and if so uses Reflection to pick up Basic4PPCs' internal table of Sub delegates (which Basic4PPC implements for use with "CallSub"). When Thread.Start(sub) is invoked it picks up the delegate for the Sub to be run on a separate thread, creates a new thread and runs the delegate on that thread. The delegates for the RunLocked methods are picked up the same way but are run on the calling thread. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Threading | Mr_Gee | Basic4ppc Wishlist | 0 | 09-23-2008 08:57 PM |
| formEXdesktop.dll and threading.dll | Byak@ | Questions & Help Needed | 5 | 08-13-2008 04:05 PM |
| Image processing library | agraham | Additional Libraries | 13 | 01-27-2008 12:51 PM |
| Multi StrInsert | tcgoh | Questions & Help Needed | 6 | 01-26-2008 02:47 PM |
| Multi-tab forms | Rioven | Questions & Help Needed | 6 | 06-11-2007 04:49 AM |