Libspinscale: Initial top-level SMO port to coroutine framework
We haven't ported everything. Just the top-level methods. We'll dig in to the leaf stuff later. Surprisingly, this all went without any real difficulties. Runs like a charm on first try.
This commit is contained in:
@@ -7,11 +7,10 @@
|
||||
#include <string>
|
||||
#include <optional>
|
||||
#include <functional>
|
||||
#include <spinscale/asynchronousLoop.h>
|
||||
#include <stimBuffApis/stimBuffApiLib.h>
|
||||
#include <user/deviceAttachmentSpec.h>
|
||||
#include <spinscale/callback.h>
|
||||
#include <spinscale/qutex.h>
|
||||
#include <spinscale/co/coQutex.h>
|
||||
#include <spinscale/sharedResourceGroup.h>
|
||||
|
||||
namespace smo {
|
||||
namespace stim_buff {
|
||||
@@ -19,6 +18,11 @@ namespace stim_buff {
|
||||
class StimBuffApiManager
|
||||
{
|
||||
public:
|
||||
struct Resources
|
||||
{
|
||||
std::vector<std::shared_ptr<StimBuffApiLib>> stimBuffApiLibs;
|
||||
};
|
||||
|
||||
static StimBuffApiManager& getInstance()
|
||||
{
|
||||
static StimBuffApiManager instance;
|
||||
@@ -54,17 +58,16 @@ public:
|
||||
|
||||
private:
|
||||
StimBuffApiManager()
|
||||
: qutex("StimBuffApiManager")
|
||||
: s("StimBuffApiManager")
|
||||
{}
|
||||
|
||||
~StimBuffApiManager() = default;
|
||||
|
||||
StimBuffApiManager(const StimBuffApiManager&) = delete;
|
||||
StimBuffApiManager& operator=(const StimBuffApiManager&) = delete;
|
||||
|
||||
std::vector<std::shared_ptr<StimBuffApiLib>> stimBuffApiLibs;
|
||||
|
||||
public:
|
||||
sscl::Qutex qutex;
|
||||
sscl::SharedResourceGroup<sscl::co::CoQutex, Resources> s;
|
||||
|
||||
public:
|
||||
static std::optional<std::string> searchForLibInSmoSearchPaths(
|
||||
|
||||
Reference in New Issue
Block a user