We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1f9008d commit c08977bCopy full SHA for c08977b
app/terminal/wandbox/wandbox.tsx
@@ -94,7 +94,10 @@ export function WandboxProvider({ children }: { children: ReactNode }) {
94
// Create a simple mutex that just executes the function immediately
95
// Wandbox doesn't need mutex locking as it makes synchronous API calls
96
const mutex: MutexInterface = {
97
- runExclusive: async <T,>(fn: () => Promise<T> | T) => fn(),
+ runExclusive: async <T,>(fn: () => Promise<T> | T) => {
98
+ const result = fn();
99
+ return result instanceof Promise ? result : Promise.resolve(result);
100
+ },
101
acquire: async () => {
102
return () => {}; // Release function (no-op)
103
},
0 commit comments