mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-01 22:48:32 +08:00
Remove legacy iothread_perform templates
We no longer need to have overloads for function pointers.
This commit is contained in:
parent
f29139e853
commit
2f29473efc
|
@ -64,19 +64,6 @@ inline int iothread_perform(std::function<void(void)> &&func) {
|
||||||
std::function<void(void)>());
|
std::function<void(void)>());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Legacy templates
|
|
||||||
template <typename T>
|
|
||||||
int iothread_perform(int (*handler)(T *), void (*completion)(T *, int), T *context) {
|
|
||||||
return iothread_perform(std::function<int(void)>([=](){return handler(context);}),
|
|
||||||
std::function<void(int)>([=](int v){completion(context, v);})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
int iothread_perform(int (*handler)(T *), T *context) {
|
|
||||||
return iothread_perform([=](){ handler(context); });
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Performs a function on the main thread, blocking until it completes.
|
/// Performs a function on the main thread, blocking until it completes.
|
||||||
void iothread_perform_on_main(std::function<void(void)> &&func);
|
void iothread_perform_on_main(std::function<void(void)> &&func);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user