ZFFramework
 
Loading...
Searching...
No Matches
ZFThread_zfasyncIO.h File Reference

thread utility More...

#include "ZFThreadPool.h"

Go to the source code of this file.

Classes

class  ZFThreadPoolForIO
 the thread pool for zfasyncIO More...
 

Functions

zfautoT< ZFTaskIdzfasyncIOCustom (const ZFListener &callback, const ZFListener &finishCallback=(zft_zfnull))
 util to perform IO in ZFThreadPoolForIO
 
zfautoT< ZFTaskIdzfasyncIO (const ZFOutput &output, const ZFInput &input, const ZFListener &finishCallback=(zft_zfnull))
 util to perform IO in ZFThreadPoolForIO
 

Detailed Description

thread utility

Function Documentation

◆ zfasyncIOCustom()

zfautoT< ZFTaskId > zfasyncIOCustom ( const ZFListener & callback,
const ZFListener & finishCallback = (zft_zfnull) )
extern

util to perform IO in ZFThreadPoolForIO

callback would run in new thread, finishCallback would run in ZFThread::mainThread

for the callback:

for the finishCallback:

when ZFTaskId::stop called after this method, the callback may or may not be canceled, but finishCallback would be canceled

◆ zfasyncIO()

zfautoT< ZFTaskId > zfasyncIO ( const ZFOutput & output,
const ZFInput & input,
const ZFListener & finishCallback = (zft_zfnull) )
extern

util to perform IO in ZFThreadPoolForIO

for the finishCallback:

when ZFTaskId::stop called after this method, the callback may or may not be canceled, but finishCallback would be canceled