Runnable.h 838 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // Runnable.h
  3. //
  4. // $Id: //poco/1.4/Foundation/include/Poco/Runnable.h#1 $
  5. //
  6. // Library: Foundation
  7. // Package: Threading
  8. // Module: Thread
  9. //
  10. // Definition of the Runnable class.
  11. //
  12. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
  13. // and Contributors.
  14. //
  15. // SPDX-License-Identifier: BSL-1.0
  16. //
  17. #ifndef Foundation_Runnable_INCLUDED
  18. #define Foundation_Runnable_INCLUDED
  19. #include "Poco/Foundation.h"
  20. namespace Poco {
  21. class Foundation_API Runnable
  22. /// The Runnable interface with the run() method
  23. /// must be implemented by classes that provide
  24. /// an entry point for a thread.
  25. {
  26. public:
  27. Runnable();
  28. virtual ~Runnable();
  29. virtual void run() = 0;
  30. /// Do whatever the thread needs to do. Must
  31. /// be overridden by subclasses.
  32. };
  33. } // namespace Poco
  34. #endif // Foundation_Runnable_INCLUDED