Re: Await on agent triggers watch functions

2019-01-08 Thread Herwig Hochleitner
Am Mo., 7. Jan. 2019 um 17:40 Uhr schrieb Oleksandr Shulgin < oleksandr.shul...@zalando.de>: > > I also see that the add-watch documentation says that the watch functions > are called "whenever the reference's state *might* have been changed", but > I just wonder if this is worth documenting. > I

Re: Await on agent triggers watch functions

2019-01-07 Thread Oleksandr Shulgin
On Mon, Jan 7, 2019 at 5:26 PM Herwig Hochleitner wrote: > Am Mo., 7. Jan. 2019 um 11:20 Uhr schrieb Oleksandr Shulgin < > oleksandr.shul...@zalando.de>: > >> >> Is it intended that calling `await` on an agent triggers the watch >> functions? >> >> From the implementation side I can see why this

Re: Await on agent triggers watch functions

2019-01-07 Thread Herwig Hochleitner
Am Mo., 7. Jan. 2019 um 11:20 Uhr schrieb Oleksandr Shulgin < oleksandr.shul...@zalando.de>: > > Is it intended that calling `await` on an agent triggers the watch > functions? > > From the implementation side I can see why this is the case, but cannot > find if this is documented as intended beha

Await on agent triggers watch functions

2019-01-07 Thread Oleksandr Shulgin
Hello, Is it intended that calling `await` on an agent triggers the watch functions? user> (defn watch1 [& args] (apply println args)) #'user/watch1 user> (def a1 (agent nil)) #'user/a1 user> (add-watch a1 :w1 watch1) #agent[{:status :ready, :val nil} 0x267236ca] user> (send a1 (constantly 1)) #a