mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 18:56:51 +08:00
Eliminate the old-style iothread_perform_on_main
All clients now use the std::function form (i.e. lambdas)
This commit is contained in:
parent
144e7b0616
commit
520e567390
|
@ -44,13 +44,4 @@ int iothread_perform(int (*handler)(T *), T *context) {
|
|||
/// Performs a function on the main thread, blocking until it completes.
|
||||
void iothread_perform_on_main(std::function<void(void)> &&func);
|
||||
|
||||
template <typename T>
|
||||
int iothread_perform_on_main(int (*handler)(T *), T *context) {
|
||||
int result = 0;
|
||||
iothread_perform_on_main([&result,handler,context](){
|
||||
result = handler(context);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user