Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.

Multithread requests

Post Reply
Haku
Posts: 12
Joined: Sat Jan 29, 2022 10:33 pm

Multithread requests

Post by Haku »

Is there a way to send requests through threads? Like in uURLRequest example but with threads
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Multithread requests

Post by salvadordf »

Hi,

Chromium handles all connections using multiple processes and threads internally.
Haku
Posts: 12
Joined: Sat Jan 29, 2022 10:33 pm

Re: Multithread requests

Post by Haku »

Do I need to create the TCEFurlRequestClientComponent on each thread or do I need to use one TCEFurlRequestClientComponent for all threads?
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Multithread requests

Post by salvadordf »

Both solutions are valid.

If you use the same component for all connections you may need to add some custom HTTP header to differentiate them.
Haku
Posts: 12
Joined: Sat Jan 29, 2022 10:33 pm

Re: Multithread requests

Post by Haku »

Not a good way, how can i use a connection component for each thread?
User avatar
salvadordf
Posts: 4580
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Multithread requests

Post by salvadordf »

Create them at runtime with a nil owner and assign the events to custom thread procedures.
Post Reply