private-octopus / picoquic

Minimal implementation of the QUIC protocol
MIT License
523 stars 153 forks source link

Add custom thread creation #1636

Closed huitema closed 4 months ago

huitema commented 4 months ago

This PR adds two important features to the network thread support:

1) Support of thread creation in application frameworks that require framework specific APIs instead of using the platform APIs in Windows or the pthread APIs in Unix systems.

2) Support of thread naming, which is difficult to implement in some OSes for which the naming API must be used from inside the named thread (Apple, mostly).

See the definition of picoquic_start_custom_network_thread in the new picoquic_packet_loop.h.

huitema commented 4 months ago

The appveyor tests are failing with a diagnostic "Failed to set up the execution context to run the test". On line search points to something related to dll dependencies. The Visual Studio tests are passing locally, so we get unblocked by just disabling test execution in Appveyor, while still checking that compile succeeds.