Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Contexts AThread?
#6
(10-27-2024, 09:35 PM)Justin Case Wrote: So a thread could handle multiple tasks (whatever a task is meant to be lol)


In this case, a task is a client context (TIdContext derives from TIdTask). But the API was abstracted so in theory it could be used for other purposes.

(10-27-2024, 09:35 PM)Justin Case Wrote: and a task could be handled across multiple threads. A context could be passed between multiple threads and multiple threads could pass around a context.


That was the plan, but it never materialized that way.

(10-27-2024, 09:35 PM)Justin Case Wrote: but a thread pool has threads that can handle multiple tasks.

Yes. When a thread is done with a task, the thread can go back in the pool until a new task is ready for it.

That being said, the pooling is not the default behavior. You have to use the TIdSchedulerOfThreadPool component to get the behavior.

Reply


Messages In This Thread
Contexts AThread? - by Justin Case - 10-26-2024, 09:01 PM
RE: Contexts AThread? - by rlebeau - 10-27-2024, 05:33 AM
RE: Contexts AThread? - by Justin Case - 10-27-2024, 08:24 PM
RE: Contexts AThread? - by rlebeau - 10-27-2024, 09:22 PM
RE: Contexts AThread? - by Justin Case - 10-27-2024, 09:35 PM
RE: Contexts AThread? - by rlebeau - 10-27-2024, 10:00 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)