Skip to content

HW6 Coroutines#6

Open
Green-Chan wants to merge 5 commits into
masterfrom
HW6-Coroutines
Open

HW6 Coroutines#6
Green-Chan wants to merge 5 commits into
masterfrom
HW6-Coroutines

Conversation

@Green-Chan

Copy link
Copy Markdown
Owner

No description provided.

Comment thread include/afina/coroutine/Engine.h Outdated
Comment on lines +76 to +78
bool grows_upwards;

void set_grows_upwards();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем?

Comment thread include/afina/coroutine/Engine.h Outdated
Comment on lines +102 to +106
if (grows_upwards) {
pc->Low = StackBottom;
} else {
pc->High = StackBottom + 1;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем тут то?

Comment thread include/afina/coroutine/Engine.h Outdated
Comment on lines +242 to +246
while (blocked != nullptr) {
auto to_del = blocked;
blocked = blocked->next;
delete to_del;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут просто бросать exception

Comment thread src/coroutine/Engine.cpp Outdated
void Engine::sched(void *routine_) {}
void Engine::unblock(void *coro) {
auto coroutine = static_cast<context *>(coro);
for (auto routine = blocked; routine != nullptr; routine = routine->next) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это 2х связгый список, зачем проход линейный?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants