Skip to content

Commit

Permalink
Address review feedback (#1189)
Browse files Browse the repository at this point in the history
* Ready for PR

* buildbot issue

* buildbot issue

* fix toitp tests for windws

* fix profiler tests

* toitp test fixes for windows

* More windows test case fixes

* Added LINE_TERMINATOR constant

* Updated bases on review comments

* Address feedback

Co-authored-by: mikkel <[email protected]>
  • Loading branch information
kasperl and mikkeldamsgaard authored Nov 13, 2022
1 parent 1d94bdc commit 1299f87
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/event_sources/event_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ class WindowsEventThread: public Thread {
stopped_ = true;
SetEvent(control_event_);
}

size_t size() {
return resource_events_.size();
}

void add_resource_event(Locker& event_source_locker, WindowsResourceEvent* resource_event) {
ASSERT(resource_events_.size() < MAXIMUM_WAIT_OBJECTS - 2);
resource_events_.insert(resource_event);
Expand Down Expand Up @@ -149,7 +149,7 @@ void WindowsEventSource::on_register_resource(Locker &locker, Resource* r) {

// Find a thread with capacity.
bool placed_it = false;
for(auto thread : threads_) {
for (auto thread : threads_) {
if (thread->size() < MAXIMUM_WAIT_OBJECTS - 2) {
resource_event = _new WindowsResourceEvent(windows_resource, event, thread);
placed_it = true;
Expand Down
2 changes: 0 additions & 2 deletions src/resources/subprocess.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class SubprocessResourceGroup : public ResourceGroup {
TAG(SubprocessResourceGroup);
SubprocessResourceGroup(Process* process, EventSource* event_source) : ResourceGroup(process, event_source) {}
uint32_t on_event(Resource* resource, word data, uint32_t state) override;

private:
};

#if defined(TOIT_WINDOWS)
Expand Down

0 comments on commit 1299f87

Please sign in to comment.