Recent

Author Topic: Best practice for a multi-platform worker thread  (Read 8917 times)

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #15 on: July 16, 2018, 02:24:24 pm »
It's hard to be simple and to keep it easy hehehehe. Only Masters can!
 >:D
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

wadman

  • New Member
  • *
  • Posts: 37
    • wadman's home
Re: Best practice for a multi-platform worker thread
« Reply #16 on: July 16, 2018, 02:53:49 pm »
1) your WThread uses WMessage (not adviced on other platforms but windows)
But it's magically working on other operating systems. :)


Use variants or not - the programmer decides. The source code is open.

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #17 on: July 16, 2018, 05:13:32 pm »
mine is closed?
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Thaddy

  • Hero Member
  • *****
  • Posts: 14159
  • Probably until I exterminate Putin.
Specialize a type, not a var.

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #19 on: July 16, 2018, 09:06:51 pm »
How about the examples here: https://www.freepascal.org/docs-html/rtl/classes/tthread.executeinthread.html
ExecuteInThread fires a single method in a created for this purpose thread and then stops that thread. That is far different from having a thread running a loop awaiting multiple orderS from main or other threads
« Last Edit: July 16, 2018, 09:09:34 pm by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Thaddy

  • Hero Member
  • *****
  • Posts: 14159
  • Probably until I exterminate Putin.
Re: Best practice for a multi-platform worker thread
« Reply #20 on: July 16, 2018, 09:11:08 pm »
How about the examples here: https://www.freepascal.org/docs-html/rtl/classes/tthread.executeinthread.html
ExecuteInThread fires a single method in a created for this purpose thread and then stops that thread. That is far different from having a thread running a loop awaiting multiple orderS from main or other threads
WHAT is different? You can implement such a loop inside the procedure...
Specialize a type, not a var.

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #21 on: July 16, 2018, 09:16:56 pm »

WHAT...
Stop barking at the moonlight, grab a book and learn instead of telling others to do so :P
when I said FAR different , think about re-entrance, and reusable variables
ExecuteInThread is not reentrant
Derived Threads looping can be, with local variables inside the derived designed thread
« Last Edit: July 16, 2018, 09:23:49 pm by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

Thaddy

  • Hero Member
  • *****
  • Posts: 14159
  • Probably until I exterminate Putin.
Re: Best practice for a multi-platform worker thread
« Reply #22 on: July 16, 2018, 10:02:35 pm »
Assignable typed constants are re-entrant..... No problems there...
Specialize a type, not a var.

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #23 on: July 17, 2018, 03:53:06 am »
Assignable typed constants are re-entrant..... No problems there...
cool for you in your tiny amateur world  :P can you please explain how you run a 'tree of threads' with yer poor knowledge Ima curious bird  :D :D :D
« Last Edit: July 17, 2018, 03:55:59 am by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #24 on: July 17, 2018, 03:53:56 am »

Not it is NOT. Basics. It is about the initiating thread - that happens to be often the main thread...... This is silly..If you missed that?  back to school <grumpyish  :D>
I have trees of threads running...

bbbHAAHHAHAAHAHAHAH threadpool or deadpool that is the kuestion. A tree or a scrubland? hahahahahahaha
« Last Edit: July 17, 2018, 04:05:57 am by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

mercurhyo

  • Full Member
  • ***
  • Posts: 242
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

balazsszekely

  • Guest
Re: Best practice for a multi-platform worker thread
« Reply #26 on: July 17, 2018, 06:18:15 am »
@mercurhyo
One Thaddy/forum is more then enough, no need to play with the same cards as him. More over it seems like the following users are the same: sam707, pigrimm, gulyone, mercurhyo.  Same jokes, same posting style like the uppercase "HAAHHAHAAHAHAHAH". More over neither one of you edit the original post, you're inclined to post over and over again. I hope you don't suffer from multiple personality disorder.

mercurhyo

  • Full Member
  • ***
  • Posts: 242
Re: Best practice for a multi-platform worker thread
« Reply #27 on: July 17, 2018, 06:59:35 am »
I also am Thaddy, queen Mary, Bill Cody, king Richard, Vlad Tepes, and... your mom! didn't you guess, paranoid @getmem?
 :D
« Last Edit: July 17, 2018, 07:05:50 am by mercurhyo »
DEO MERCHVRIO - Linux, Win10pro - Ryzen9XT 24threads + Geforce Rtx 3080SUPRIM
god of financial gain, commerce, eloquence (and thus poetry), messages, communication (including divination), travelers, boundaries, luck, trickery and thieves; he also serves as the guide of souls to the underworld

balazsszekely

  • Guest
Re: Best practice for a multi-platform worker thread
« Reply #28 on: July 17, 2018, 07:13:02 am »
Quote
I also am Thaddy
You're definitely not Thaddy, though both of you are childish.

Quote
queen Mary, Bill Cody, king Richard, Vlad Tepes, and... your mom!
Lol just like sam707.

PS: I leave you with Thaddy, I have better things to do.

 

 

TinyPortal © 2005-2018