Thanks Olly, that's what I'm after and it's so much simpler than
CWorkerThread!
Harry, I am already using curl. It doesn't thread by itself.
On 06/09/2010 8:26, Olly wrote:
Take a look at //public/tier0/threadtools.h
unsigned MyThread( void *params )
{
// cast params back to MyThreadParams_t or whatever
// Do thread stuff here
}
// -----------
struct MyThreadParams_t
{
int iVar;
float flFloat;
}
MyThreadParams_t *some_params = new MyThreadParams_t;
some_params.iVar = 1;
some_params.flFloat = 0.3f;
CreateSimpleThread( MyThread, some_params );
VEEERY simple example, but the MyThread function will run in a seperate
thread (along with any subsequent calls from that function).
Olly
On 6 September 2010 20:16, Tom Edwards<[email protected]> wrote:
Hi everyone. I'm trying to push a set of sizeable HTTP downloads off to an
asynch thread, but I can't work out how to do it: all of the approaches I've
tried have frozen the server while processing. Will any of Source's built-in
thread classes actually do what I want?
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders