Runnable.h 777 B

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