2 ms·
All of the contention issues that we've had for ages across all platforms exist in CL. Loading and compiling new code isn't any different than two separate thre
by whartung 4y ago
All of the contention issues that we've had for ages across all platforms exist in CL. Loading and compiling new code isn't any different than two separate threads calling setq on the same element at the same time.
The reality, though, is that the vast majority of the time when this is done, the system is idle. If you live update your server that's serving 1000 connections and isn't specifically coded to handle this potential event, then, for sure, there can be trouble.
But if you're hot reloading your dev server, with an idle connection, then you're likely to have fewer problems.
However, there's the potential impact of captured state that is not properly refreshed. For example, if you have some long running state that, say, captured a function via #'my-func, then that routine has, indeed, captured the pointer to the routine. But when you redefined it, the symbol (i.e. my-func) is now pointing to the new code, while your existing state is pointing to the old code. Any code that uses the symbol to call the routine will update automatically, but anything that does not, is stuck with stale data.
And that rock potentially sends different ripples through the still pond of your running image. Just something to be aware of.
It's a great feature, just need to be aware of what's going on when you do it. Most of the time, it's a non-issue.
- deleted 4y ago[deleted]