funcool

2023-06-25T14:24:21.124019Z

I want this to return empty when the channel is empty. without a timeout this call get stuck. is adding a timeout the proper way to do this or is there a different way?

(if-let [v (sp/take! channel)]
  v
  "empty")

2023-06-25T14:30:06.215429Z

it doesn't feel right

2023-06-25T14:31:12.102609Z

is sp/poll! the right function to use?

2023-06-25T19:36:14.068939Z

nevermind I was doing something wrong