• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

Objects and Multithreading ... did you see the examples?

Started by Theo Gottwald, August 16, 2008, 06:52:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Theo Gottwald

Imagine you have Job to do.

For example to calculate something from a list of numbers.
Maybe to calculate if a large number is a prime number or not.

You make a CLASS and let it run as a thread - multithreading.
Take the next number and just let another CPU-Core get busy.

I think Objects and multithreading is a hot topic.
Because Objects contain their Program and their Data.

But where can we find examples on this?
Answer: We already got a nice example supplied with PB 9!

Take a look in the sample-folder and there in the COM-Folder in the subfolder "PRIME".

Btw. did you look the supplied samples already?

Murray Ruggiero

  Does the Prime example in version 9.0 have a mult-threading version of prime or only a single thread version which need to be modified.
It would be useful if there is not a multi-thread version if someone who knows how to use the multi-threading with PB , could do a complete example based on Prime to show how to start New instances of classes in new threads.