Skip to content

blocking check in test will fail in future virtual thread-backed core.async #49

@puredanger

Description

@puredanger

The test in nodely.engine.core-async.lazy-scheduling-test:

(deftest blocking-tagging-test
  (testing "about the blocking tag"
    (testing "go-checking system property is set"
      (is (Boolean/getBoolean "clojure.core.async.go-checking")))
    (testing "eval of an env with blocking ops in dispatch worker pool provokes exceptions, evaling same ops in threads doesn't"
      (is (match? [true java.lang.IllegalStateException]
                  (update (nasync/eval-key env-with-blocking-take :d)
                          1
                          class))))))

will eventually no longer work once we move to virtual threads in core.async. When we get to that point (there is no release of this yet, but it's coming), go-checking is probably not going to actually work anymore, because there will be no way to detect that a blocking op is actually in the context of a go block (and actually, this code will now work on vthreads).

I'm not sure if that means the test should be removed or further qualified to understand the conditions where it is valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions