ZFFramework
 
Loading...
Searching...
No Matches
ZFThread_zfasyncIO.h
Go to the documentation of this file.
1
5
6#ifndef _ZFI_ZFThread_zfasyncIO_h_
7#define _ZFI_ZFThread_zfasyncIO_h_
8
9#include "ZFThreadPool.h"
11
35 , ZFMP_IN(const ZFListener &, callback)
36 , ZFMP_IN_OPT(const ZFListener &, finishCallback, zfnull)
37 )
38
39
51 , ZFMP_IN(ZF_IN const ZFOutput &, output)
52 , ZFMP_IN(ZF_IN const ZFInput &, input)
53 , ZFMP_IN_OPT(const ZFListener &, finishCallback, zfnull)
54 )
55
56// ============================================================
60zfclass ZFLIB_ZFCore ZFThreadPoolForIO : zfextend ZFThreadPool {
61 ZFOBJECT_DECLARE(ZFThreadPoolForIO, ZFThreadPool)
63
69};
70
72#endif // #ifndef _ZFI_ZFThread_zfasyncIO_h_
73
#define ZFLIB_ZFCore
used to export symbols
Definition ZFCoreEnvDef.h:30
#define zfextend
dummy macro shows class inherit from another
Definition ZFCoreTypeDef_ClassType.h:53
#define ZF_IN
dummy macro that shows the param used as required input
Definition ZFCoreTypeDef_ClassType.h:180
_ZFT_t_zfindex zfindex
similar to size_t, used for index and size only
Definition ZFCoreTypeDef_CoreType.h:154
#define zfnull
same as NULL, defined for future use
Definition ZFCoreTypeDef_CoreType.h:88
#define ZFMP_IN_OPT(ParamType, paramName, DefaultValue)
see ZFMP_IN
Definition ZFMethod.h:108
#define ZFMP_IN(ParamType, paramName)
macro to wrap param types for ZFMETHOD_INLINE_0 series
Definition ZFMethod.h:105
#define ZFMETHOD_FUNC_DECLARE_2(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:763
#define ZFMETHOD_FUNC_DECLARE_3(ZFLIB_, ReturnType, MethodName, ZFMP_0, ZFMP_1, ZFMP_2)
see ZFMETHOD_FUNC_DECLARE_0
Definition ZFMethodFuncDeclare.h:910
#define ZF_NAMESPACE_GLOBAL_BEGIN
begin namespace ZFFramework
Definition ZFNamespace.h:97
#define ZF_NAMESPACE_GLOBAL_END
end namespace ZFFramework
Definition ZFNamespace.h:98
#define zfclass
same as class, shows that this class is a ZFObject type
Definition ZFObjectClassTypeFwd.h:38
#define ZFOBJECT_DECLARE(ChildClass, SuperClass,...)
necessary for every class inherit from ZFObject
Definition ZFObjectDeclare.h:126
#define ZFOBJECT_SINGLETON_DECLARE(AccessTypeName, accessMethodName)
util macro to declare a singleton instance access for ZFObject type
Definition ZFObjectGlobalInstance.h:256
#define ZFPROPERTY_ASSIGN(Type, Name,...)
see ZFPROPERTY_RETAIN
Definition ZFPropertyDeclare.h:128
zfautoT< ZFTaskId > zfasyncIO(const ZFOutput &output, const ZFInput &input, const ZFListener &finishCallback=(zft_zfnull))
util to perform IO in ZFThreadPoolForIO
zfautoT< ZFTaskId > zfasyncIOCustom(const ZFListener &callback, const ZFListener &finishCallback=(zft_zfnull))
util to perform IO in ZFThreadPoolForIO
thread utility
general input callback
Definition ZFIOCallback_input.h:37
listener as ZFCallback, mostly used by ZFObject::observerNotify
Definition ZFObjectObserver.h:30
general output callback
Definition ZFIOCallback_output.h:37
abstract task id
Definition ZFTaskId.h:16
virtual zfindex & blockSize()
when input size greater than this, try to split task to different thread
Definition ZFThread_zfasyncIO.h:68
static ZFThreadPoolForIO * instance()
type restrict version of zfauto
Definition zfautoFwd.h:110