Questions tagged [suspend]

469 questions
6
votes
1 answer

How does transaction suspension work in MySQL?

In the Spring Framework manual they state that for a PROPAGATION_REQUIRES_NEW the current transaction will be suspended. What does that "suspended transaction"? The timer for the timeout stops counting on the current transaction? What are the…
Asaf Mesika
  • 1,643
  • 4
  • 20
  • 33
6
votes
3 answers

Suspending the execution of a remote process (C, Windows)

I can suspend a thread of another process by using SuspendThread(). Is there any way to also suspend the execution of that process altogether? If yes, please post code. Thanks. PS: Since you will ask "Why do you want to do this" I'll post it here. I…
wonderer
  • 3,487
  • 11
  • 49
  • 59
6
votes
1 answer

How to Suspend and Resume Threads in android?

I just noticed that suspend and resume in android threading has been deprecated. What is the work around for this or how can I suspend and resume a thread in android?
rosesr
  • 749
  • 1
  • 7
  • 10
5
votes
2 answers

how to suspend/restart processes in C (linux)

Hi I have to write 2 fonctions for system calls that will manage the execution of task in an operating system. I couldn't find a way to suspend/restart processes. I have found a list of signals and I know the kill function and here is my…
vallllll
  • 2,731
  • 6
  • 43
  • 77
5
votes
2 answers

Relation between Arrow suspend functions and monad comprehension

I am new to Arrow and try to establish my mental model of how its effects system works; in particular, how it leverages Kotlin's suspend system. My very vague understanding is as follows; if would be great if someone could confirm, clarify, or…
Ulrich Schuster
  • 1,670
  • 15
  • 24
5
votes
1 answer

What is the correct way to convert a Kotlin suspend function to a function returning Mono?

Let's say we have a function suspend fun doSomething(value: Int): String { delay(1000L) return "abc_$value" } How to convert it to a function returning Mono? Are there any hidden problems with switching between threads belonging to…
diziaq
  • 6,881
  • 16
  • 54
  • 96
5
votes
4 answers

How to Call Suspend Function from Function

I am trying to call a suspend function in the parameters of another suspend function. The compiler doesn't actually allow this. It is telling me that a suspend function must be called from a suspend function or coroutine. suspend fun…
J_Strauton
  • 2,270
  • 3
  • 28
  • 70
5
votes
0 answers

This UWP process is suspended to improve system performance ... but it isn't a UWP app

We have a WPF app build on .NET Framework 4.8, but recently we saw this in the taskbar (running on windows 10 x64) : When hovering over the WPF client, the tooltip said 'This UWP process is suspended to improve system performance'. Our app was also…
5
votes
1 answer

Does mockk support suspend inline?

It looks like coEvery hangs when I am trying to mock suspend inline function. The code below works if remove inline modifier Function in storeApi: suspend inline fun getAllStores(): List Test code: coEvery { storeApi.getAllStores() } returns…
5
votes
3 answers

How to suspend and resume an application on windows?

Is there any way to suspend an application execution, store its process image to a file, and restore it later (keeping the application as it was at the moment of suspension)? What I want to do is something like an "hibernate" for applications on…
Uruka
  • 51
  • 1
5
votes
2 answers

Kotlin suspend function recursive call

Suddenly discover that recursive call of suspend function takes more time then calling the same function but without suspend modifier, so please consider the code snippet below (basic Fibonacci series calculation): suspend fun asyncFibonacci(n:…
INlHELL
  • 137
  • 3
  • 9
5
votes
1 answer

How to suspend a blocking thread without obsolete Thread.Suspend?

I have a thread that waits on TcpListener.AcceptTcpClient(), which blocks, which I want to suspend at times. I've read about Monitor.Wait(...), but I only have experience working with mutexes and if the thread waits on a blocking method, it gets…
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
5
votes
5 answers

Windows SuspendThread doesn't? (GetThreadContext fails)

We have an Windows32 application in which one thread can stop another to inspect its state [PC, etc.], by doing SuspendThread/GetThreadContext/ResumeThread. if (SuspendThread((HANDLE)hComputeThread[threadId])<0) // freeze thread …
Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
5
votes
0 answers

Windows Phone 8.1 app crashes during resume (possibly because it hangs during suspend)

I have a situation where my application crashes sometimes during the suspend/resume process. The scenario looks like this: The application runs normally. The user exits the application by an action like tapping the start button, using a file…
Ladi
  • 1,274
  • 9
  • 17
5
votes
4 answers

How to save a program's progress, and resume later?

You may know a lot of programs, e.g some password cracking programs, we can stop them while they're running, and when we run the program again (with or without entering a same input), they will be able to continue from where they have left. I wonder…
wakandan
  • 1,099
  • 4
  • 19
  • 27