The concept looks reasonable to me. Long term I'd prefer to have a local_request wrapper around struct request so that the latter doesn't get bloated by all the synchronization primitives. How do you ensure this is always called from the main thread? Calling queue_request from helper threads seems like it would cause major problems. |