refactor: load images in workers and push immediately (#5431)
This commit is contained in:
@@ -70,4 +70,13 @@ static void runInGuiThread(F &&fun)
|
||||
}
|
||||
}
|
||||
|
||||
template <typename F>
|
||||
inline void postToGuiThread(F &&fun)
|
||||
{
|
||||
assert(!isGuiThread() &&
|
||||
"postToGuiThread must be called from a non-GUI thread");
|
||||
|
||||
postToThread(std::forward<F>(fun));
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
Reference in New Issue
Block a user