Makie - reliably updating plots from another thread

Why does the following code not reliably update the plot and sometimes fail with a bounds access error?

using GLMakie

fig = Figure()

# Heatmap 
cm = rand(500, 500)
const obc = Observable(cm)

ax = Axis(fig[3, 1])
heatmap!(ax, obc, colormap=:thermal)


# Line plot
x = range(0, 100, length=100000)
y = sin.(x)
plot_series = Observable(Point2f.(x, y))

ax = Axis(fig[2, :])
lines!(ax, plot_series)


tm = Timer((timer) -> begin
        notify(obc)
        notify(plot_series)
    end, 0.0, interval=1 / 10)

i = 101
Threads.@spawn while true
    cm .= rand(500, 500)
    push!(plot_series[], Point2f(i, sin(i)))
    global i += 1
    sleep(0.2)
end