typelevel / typelevel/cats-effect

`WorkerThread#blockOn` implementation note is incorrect

Open
#4,193 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2.2k
Forks
576
Avg merge
2d 11h
Merged PRs (30d)
18

Description

blockOn may be invoked by directly using the WSTP as an ExecutionContext with scala.concurrent.blocking, no IO involved. So that's not sufficient justification for not using try/catch. Not sure if we can rejustify it, or just have to add it in.

https://github.com/typelevel/cats-effect/blob/92186482cd779b5baec1db6cf4b88245264c8592/core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala#L923-L933

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read core/jvm/src/main/scala/cats/effect/unsafe/WorkerThread.scala around lines 923-933, then inspect how blockOn is used as an ExecutionContext with scala.concurrent.blocking. Determine whether the implementation note should be reworded or the try/catch behavior changed; done means the note accurately reflects all stated blockOn entry paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.