Skip to content

Commit 1d11f6b

Browse files
committed
kill scheduler
1 parent faeed5a commit 1d11f6b

11 files changed

Lines changed: 31 additions & 867 deletions

src/main/AppConnector.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ AppConnector::getNetworkID() const
9090
}
9191

9292
void
93-
AppConnector::postOnMainThread(std::function<void()>&& f, std::string&& message,
94-
Scheduler::ActionType type)
93+
AppConnector::postOnMainThread(std::function<void()>&& f,
94+
std::string&& message)
9595
{
96-
mApp.postOnMainThread(std::move(f), std::move(message), type);
96+
mApp.postOnMainThread(std::move(f), std::move(message));
9797
}
9898

9999
void

src/main/AppConnector.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,7 @@ class AppConnector
4848

4949
// Thread-safe methods
5050
SorobanMetrics& getSorobanMetrics() const;
51-
void postOnMainThread(
52-
std::function<void()>&& f, std::string&& message,
53-
Scheduler::ActionType type = Scheduler::ActionType::NORMAL_ACTION);
51+
void postOnMainThread(std::function<void()>&& f, std::string&& message);
5452
void postOnOverlayThread(std::function<void()>&& f,
5553
std::string const& message);
5654
void postOnBackgroundThread(std::function<void()>&& f,

src/main/Application.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,9 +255,8 @@ class Application
255255
virtual asio::io_context& getOverlayIOContext() = 0;
256256
virtual asio::io_context& getLedgerCloseIOContext() = 0;
257257

258-
virtual void postOnMainThread(
259-
std::function<void()>&& f, std::string&& name,
260-
Scheduler::ActionType type = Scheduler::ActionType::NORMAL_ACTION) = 0;
258+
virtual void postOnMainThread(std::function<void()>&& f,
259+
std::string&& name) = 0;
261260

262261
// While both are lower priority than the main thread, eviction threads have
263262
// more priority than regular worker background threads

src/main/ApplicationImpl.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,8 +1536,7 @@ ApplicationImpl::getLedgerCloseIOContext()
15361536
}
15371537

15381538
void
1539-
ApplicationImpl::postOnMainThread(std::function<void()>&& f, std::string&& name,
1540-
Scheduler::ActionType type)
1539+
ApplicationImpl::postOnMainThread(std::function<void()>&& f, std::string&& name)
15411540
{
15421541
JITTER_INJECT_DELAY();
15431542
LogSlowExecution isSlow{name, LogSlowExecution::Mode::MANUAL,
@@ -1554,8 +1553,7 @@ ApplicationImpl::postOnMainThread(std::function<void()>&& f, std::string&& name,
15541553
std::this_thread::sleep_for(sleepFor);
15551554
}
15561555
f();
1557-
},
1558-
std::move(name), type);
1556+
});
15591557
}
15601558

15611559
void

src/main/ApplicationImpl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ class ApplicationImpl : public Application
9090
virtual asio::io_context& getOverlayIOContext() override;
9191
virtual asio::io_context& getLedgerCloseIOContext() override;
9292

93-
virtual void postOnMainThread(std::function<void()>&& f, std::string&& name,
94-
Scheduler::ActionType type) override;
93+
virtual void postOnMainThread(std::function<void()>&& f,
94+
std::string&& name) override;
9595
virtual void postOnBackgroundThread(std::function<void()>&& f,
9696
std::string jobName) override;
9797
virtual void postOnEvictionBackgroundThread(std::function<void()>&& f,

src/process/ProcessManagerImpl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <deque>
1212
#include <mutex>
1313
#include <vector>
14+
#include <map>
1415

1516
namespace stellar
1617
{

0 commit comments

Comments
 (0)