Thank you for taking such a in-depth look!
Seems like it’s better, but I can still get some strange behavior. After reloading the page (again, this might have to do with how JSServe acts and my specific application) it stalls, and when I look into the async reading
task I get:
julia> reading
Task (failed) @0x00007f7f69965fc0
TaskFailedException:
AssertionError: isempty(session.message_queue)
Stacktrace:
[1] send(::JSServe.Session, ::Dict{Symbol,Any}) at /home/yakir/.julia/packages/JSServe/9Z6uA/src/session.jl:83
[2] #send#28 at /home/yakir/.julia/packages/JSServe/9Z6uA/src/session.jl:76 [inlined]
[3] (::JSServe.JSUpdateObservable)(::Array{Any,1}) at /home/yakir/.julia/packages/JSServe/9Z6uA/src/observables.jl:14
[4] #invokelatest#1 at ./essentials.jl:710 [inlined]
[5] invokelatest at ./essentials.jl:709 [inlined]
[6] setindex!(::Observable{Array{Any,1}}, ::Array{Any,1}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:207
[7] setindex!(::Observable{Array{Any,1}}, ::Array{Any,1}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201
[8] (::WGLMakie.var"#7#8"{Observable{Array{Any,1}},Symbol})(::Tuple{typeof(setindex!),Tuple{Array{Point{2,Float32},1},Colon}}) at /home/yakir/.julia/packages/WGLMakie/QIWts/src/serialization.jl:190
[9] #invokelatest#1 at ./essentials.jl:710 [inlined]
[10] invokelatest at ./essentials.jl:709 [inlined]
[11] setindex!(::Observable{Tuple{Function,Tuple}}, ::Tuple{typeof(setindex!),Tuple{Array{Point{2,Float32},1},Colon}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:207
[12] setindex!(::Observable{Tuple{Function,Tuple}}, ::Tuple{typeof(setindex!),Tuple{Array{Point{2,Float32},1},Colon}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201
[13] setindex!(::ShaderAbstractions.ArrayUpdater{Array{Point{2,Float32},1}}, ::Array{Point{2,Float32},1}, ::Function) at /home/yakir/.julia/packages/ShaderAbstractions/vrRjy/src/types.jl:46
[14] setindex! at /home/yakir/.julia/packages/ShaderAbstractions/vrRjy/src/types.jl:59 [inlined]
[15] (::ShaderAbstractions.var"#9#10"{ShaderAbstractions.Buffer{Point{2,Float32},Array{Point{2,Float32},1}}})(::Array{Point{2,Float32},1}) at /home/yakir/.julia/packages/ShaderAbstractions/vrRjy/src/types.jl:146
[16] #invokelatest#1 at ./essentials.jl:710 [inlined]
[17] invokelatest at ./essentials.jl:709 [inlined]
[18] setindex!(::Observable{Array{Point{2,Float32},1}}, ::Array{Point{2,Float32},1}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:207
[19] setindex! at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201 [inlined]
[20] MapUpdater at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:326 [inlined]
[21] (::Observables.OnUpdate{Observables.MapUpdater{typeof(first),Array{Point{2,Float32},1}},Tuple{Observable{Tuple{Array{Point{2,Float32},1},Array{Point{2,Float32},1}}}}})(::Tuple{Array{Point{2,Float32},1},Array{Point{2,Float32},1}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:293
[22] setindex!(::Observable{Tuple{Array{Point{2,Float32},1},Array{Point{2,Float32},1}}}, ::Tuple{Array{Point{2,Float32},1},Array{Point{2,Float32},1}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:205
[23] setindex! at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201 [inlined]
[24] MapUpdater at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:326 [inlined]
[25] (::Observables.OnUpdate{Observables.MapUpdater{WGLMakie.var"#73#80"{Observable{StepRange{Int64,Int64}},Observable{StepRange{Int64,Int64}}},Tuple{Array{Point{2,Float32},1},Array{Point{2,Float32},1}}},Tuple{Observable{Base.ReinterpretArray{Point{2,Float32},1,Tuple{Point{2,Float32},Point{2,Float32}},GeometryBasics.TupleView{Tuple{Point{2,Float32},Point{2,Float32}},2,1,CircularBuffer{Point{2,Float32}}}}}}})(::Base.ReinterpretArray{Point{2,Float32},1,Tuple{Point{2,Float32},Point{2,Float32}},GeometryBasics.TupleView{Tuple{Point{2,Float32},Point{2,Float32}},2,1,CircularBuffer{Point{2,Float32}}}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:293
[26] setindex!(::Observable{Base.ReinterpretArray{Point{2,Float32},1,Tuple{Point{2,Float32},Point{2,Float32}},GeometryBasics.TupleView{Tuple{Point{2,Float32},Point{2,Float32}},2,1,CircularBuffer{Point{2,Float32}}}}}, ::Base.ReinterpretArray{Point{2,Float32},1,Tuple{Point{2,Float32},Point{2,Float32}},GeometryBasics.TupleView{Tuple{Point{2,Float32},Point{2,Float32}},2,1,CircularBuffer{Point{2,Float32}}}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:205
[27] setindex! at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201 [inlined]
[28] (::Observables.MapUpdater{WGLMakie.var"#70#77"{Combined{AbstractPlotting.lines,Tuple{CircularBuffer{Point{2,Float32}}}}},Base.ReinterpretArray{Point{2,Float32},1,Tuple{Point{2,Float32},Point{2,Float32}},GeometryBasics.TupleView{Tuple{Point{2,Float32},Point{2,Float32}},2,1,CircularBuffer{Point{2,Float32}}}}})(::CircularBuffer{Point{2,Float32}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:326
[29] (::Observables.OnUpdate{Observables.MapUpdater{WGLMakie.var"#70#77"{Combined{AbstractPlotting.lines,Tuple{CircularBuffer{Point{2,Float32}}}}},Base.ReinterpretArray{Point{2,Float32},1,Tuple{Point{2,Float32},Point{2,Float32}},GeometryBasics.TupleView{Tuple{Point{2,Float32},Point{2,Float32}},2,1,CircularBuffer{Point{2,Float32}}}}},Tuple{Observable{CircularBuffer{Point{2,Float32}}}}})(::CircularBuffer{Point{2,Float32}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:293
[30] setindex!(::Observable{CircularBuffer{Point{2,Float32}}}, ::CircularBuffer{Point{2,Float32}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:205
[31] setindex! at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201 [inlined]
[32] MapUpdater at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:326 [inlined]
[33] (::Observables.OnUpdate{Observables.MapUpdater{AbstractPlotting.var"#183#185"{Int64},CircularBuffer{Point{2,Float32}}},Tuple{Observable{Tuple{CircularBuffer{Point{2,Float32}}}}}})(::Tuple{CircularBuffer{Point{2,Float32}}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:293
[34] setindex!(::Observable{Tuple{CircularBuffer{Point{2,Float32}}}}, ::Tuple{CircularBuffer{Point{2,Float32}}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:205
[35] setindex!(::Observable{Tuple{CircularBuffer{Point{2,Float32}}}}, ::Tuple{CircularBuffer{Point{2,Float32}}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201
[36] (::AbstractPlotting.var"#201#203"{DataType,Observable{Tuple{CircularBuffer{Point{2,Float32}}}}})(::Tuple{}, ::Tuple{CircularBuffer{Point{2,Float32}}}) at /home/yakir/.julia/packages/AbstractPlotting/JCbJs/src/interfaces.jl:626
[37] (::Observables.OnUpdate{AbstractPlotting.var"#201#203"{DataType,Observable{Tuple{CircularBuffer{Point{2,Float32}}}}},Tuple{Observable{Tuple{}},Observable{Tuple{CircularBuffer{Point{2,Float32}}}}}})(::Tuple{CircularBuffer{Point{2,Float32}}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:293
[38] setindex!(::Observable{Tuple{CircularBuffer{Point{2,Float32}}}}, ::Tuple{CircularBuffer{Point{2,Float32}}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:205
[39] setindex! at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201 [inlined]
[40] MapUpdater at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:326 [inlined]
[41] (::Observables.OnUpdate{Observables.MapUpdater{typeof(tuple),Tuple{CircularBuffer{Point{2,Float32}}}},Tuple{Observable{CircularBuffer{Point{2,Float32}}}}})(::CircularBuffer{Point{2,Float32}}) at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:293
[42] setindex!(::Observable{CircularBuffer{Point{2,Float32}}}, ::CircularBuffer{Point{2,Float32}}; notify::Observables.var"#9#11") at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:205
[43] setindex! at /home/yakir/.julia/packages/Observables/A7I8T/src/Observables.jl:201 [inlined]
[44] sample!(::Arduino) at /home/yakir/.julia/dev/SimpleFanControl/src/simpler.jl:72
[45] (::var"#5#8")() at ./task.jl:356
wait at ./task.jl:267 [inlined]
macro expansion at /home/yakir/.julia/dev/SimpleFanControl/src/simpler.jl:84 [inlined]
(::var"#3#6")() at ./task.jl:356
COBS.jl
is mine, is there anything specific I can do to remidy that, I’d love to improve it if possible!