Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Coroutine pending_increment does not halt execution of coroutine

オープン
#7 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
cpp, unreal-engine
領域
game-dev

調査の方向性

サンプルと UE4 4.22 のセットアップを使用して、REPL で coroutine の動作を再現します。SkMind の pending リスト内で pending_increment を追跡し、m_pending_count が実行にどのような影響を与えるかを調べます。完了条件は、期待される出力と一致するように、c1 がインクリメント後に停止し、pending_decrement の後に再開することです。

索引モデルが issue の本文から書いたものです。

説明

bug

Issue by error454
Wednesday Jul 03, 2019 at 03:02 GMT
Originally opened as https://github.com/SkookumScript/SkookumScript-Plugin/issues/7


UE4 Version
4.22

SkookumScript Version
4.22

Describe the bug
Calling pending_increment does not suspend a running coroutine as the documentation alludes to.

// Increments the number of expressions / tasks currently executing in
// parallel that the invoked object is waiting for a return value from.
// If the number was 0 and is increased then the invoked object will be
// suspended until the pending number is reduced back to 0 by calling
// pending_decrement().

To Reproduce
Run the following sample code in the REPL

// Coroutine suspend test
!x : 0
!y : 0

!f : (Integer in)[in += 1]
!c1 : branch[loop[f(x) _wait(1.0)]]
!c2 : branch[loop[f(y) _wait(1.0)]]

race
[
  loop
  [
    println(x, ".", y)
    _wait(1.0)
  ]
  [
    _wait(2)
    c1.pending_increment(1)
    _wait(1)
    c1.pending_decrement
    _wait(10)
  ]
]

// Expected Output:
// 0.0
// 1.1
// 1.2
// 2.3
// ...

Expected behavior
After calling c1.pending_increment(1) the c1 coroutine should stop running until I call c1.pending_decrement.

Additional context
I've done some debugging around this. When I break on the call to c1.pending_increment, I see that c1 already has an m_pending_count of 1, which means the coroutine is already on the SkMind's pending list. I simply don't see any glue that stops execution of the coroutine once it is on that list.

主要言語
C++
スター
138
フォーク
22
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

EpicSkookumScript/SkookumScript-Plugin のほかの issue

EpicSkookumScript/SkookumScript-Plugin の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。