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

macOS: Racket threads do not run while dragging a slider%

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
領域
desktop

調査の方向性

提供された racket/gui の例から始め、macOS でスライダーをドラッグしている間の停止を再現します。次に queue.rkt と event-tracking モードの動作を調べます。issue は、run loop のソースが関係している可能性を示唆しています。スライダーのドラッグ中も eventspace に属さないスレッドとタイマーが実行を継続すれば完了です。

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

説明

Re. https://github.com/Bogdanp/racket-gui-easy/issues/63#issuecomment-3225228993.

As the title says, when dragging a slider, threads other than the eventspace thread are suspended. So, the threads in this example end up not running while dragging the slider (or while initiating a drag and holding the slider):

#lang racket/gui

(define f
  (new frame%
       [label "Test"]))

(define thd
  (thread
   (lambda ()
     (let loop ()
       (println `(value ,(thread-receive)))
       (loop)))))

(define tick-thd
  (thread
   (lambda ()
     (let loop ()
       (println 'tick)
       (sleep 1)
       (loop)))))

(define timer
  (new timer%
       [notify-callback
        (lambda ()
          (println 'timer-tick))]
       [interval 1000]))

(define s
  (new slider%
       [parent f]
       [label "Test"]
       [init-value 0]
       [min-value 0]
       [max-value 100]
       [callback (lambda (self _event)
                   (thread-send thd (send self get-value)))]))

(send f show #t)

Surprisingly, the timer% doesn't run either.

As a hack, I've tried setting up a display link to post dummy events between drag start and end (the display link is necessary because changed: does not fire if you just hold the slider after dragging), but that doesn't seem to help. Probably the right solution is a run loop source in queue.rkt for the event tracking mode, but I'm not sure how to do that.

主要言語
Racket
スター
68
フォーク
83
平均マージ
4日 4時間
マージ済み PR(30日)
3

環境構築

はじめの一歩

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

racket/gui のほかの issue

racket/gui の issue をすべて見る

似ている issue

Desktop Dev の issue をもっと見る

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

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