xref: /haiku/src/apps/haikudepot/process/ThreadedProcessNode.h (revision 895e0c8a3260907dd12f7bd6e44d7c8846ae7951)
1 /*
2  * Copyright 2021, Andrew Lindesay <apl@lindesay.co.nz>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef THREADED_PROCESS_NODE_H
6 #define THREADED_PROCESS_NODE_H
7 
8 
9 #include "AbstractProcessNode.h"
10 
11 
12 class AbstractProcess;
13 
14 
15 class ThreadedProcessNode : public AbstractProcessNode {
16 public:
17 								ThreadedProcessNode(AbstractProcess* process,
18 									int32 startTimeoutSeconds);
19 								ThreadedProcessNode(AbstractProcess* process);
20 	virtual						~ThreadedProcessNode();
21 
22 	virtual	status_t			Start();
23 	virtual	status_t			RequestStop();
24 
25 private:
26 	static	status_t			_StartProcess(void* cookie);
27 
28 			thread_id			fWorker;
29 			int32				fStartTimeoutSeconds;
30 };
31 
32 
33 #endif // THREADED_PROCESS_NODE_H
34