mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00: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
1 changed files with 0 additions and 13 deletions
|
@ -64,19 +64,6 @@ inline int iothread_perform(std::function<void(void)> &&func) {
|
|||
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.
|
||||
void iothread_perform_on_main(std::function<void(void)> &&func);
|
||||
|
||||
|
|
Loading…
Reference in a new issue