Skip to main content

Questions tagged [continuations]

In computer science and programming, a continuation is an abstract representation of the control state. A continuation reifies an instance of a computational process at a given point in the process's execution. It contains information such as the process's current stack (including all data whose lifetime is within the process e.g. "local variables"), as well the process's point in the computation.

2 votes
0 answers
63 views

ZIO fiber exception lost parent stacktrace on top level catchAll

I'm tracing some error in our production environment. Found cause.squash not give a helpful message. And I test a demo to see how it output when exception in fiber: import zio.* object ...
LoranceChen's user avatar
  • 2,541
0 votes
1 answer
46 views

Working of interceptContinuation() and releaseInterceptedContinuation()

I have read the documentation like ContinuationInterceptor , githhub for the functions interceptContinuation() and releaseInterceptedContinuation(). However, I struggled to understand their usage ...
DeadLock's user avatar
0 votes
1 answer
34 views

What is the equivalent of the code written by jetty.continuation in Jakarta.server.AsyncContext?

I want to upgrade my project from jetty 9 to 12. Since the jetty.continuation is deprecated, I want to replace the following code snippet using AsyncContext class. Continuation cont = ...
F Goli's user avatar
  • 1
1 vote
1 answer
63 views

Understanding *abort continuations in scheme/racket

Days ago i started reading about continuations and delimited continuation control operators in Scheme (i'm working in racket but using scheme continuations). In that context i was trying the shift/...
Ric's user avatar
  • 5,617
0 votes
0 answers
54 views

Result in PagingSource (paging library 3, Java)

Good afternoon In the TMessagePagingSource class (extends from PagingSource<TMessageKey, TMessage>) I override the load() function: public class TMessagePagingSource extends PagingSource<...
Станислав Морозов's user avatar
0 votes
0 answers
35 views

continuations in lua, is not working while trying extending it

int resume_continuation_func(lua_State *co, int status, lua_KContext ctx) { int res; printf("gggggggggggggggggggggggg\n"); if (status != LUA_OK && status != LUA_YIELD) { ...
konstantinos's user avatar
1 vote
1 answer
58 views

lua_resume has segmentation faults

I have the follwing code, trying to understand C-Api , lua_resume, continuations and different cases, just for expirements as doc mentions. I am currently in lua 5.4 on an ubuntu desktop. I have the ...
kos's user avatar
  • 45
2 votes
1 answer
169 views

Get current contiuation in Scala

Haskell has a function for getting the current continuation getCC = callCC (\c -> let x = c x in return x) How to write a similar function in Scala? E.g. function callCC presents in cats.ContT. ...
Sergey Sviridov's user avatar
3 votes
1 answer
145 views

Codensity and ContT

While studying functional programming and exploring the concept of continuations, I became acquainted with the types (monad transformers) Codensity and ContT. They look similar, but it is still not ...
Sergey Sviridov's user avatar
0 votes
1 answer
68 views

DrRacket's call/cc

#lang racket (let ((r (lambda (cont) (if (zero? (random 2)) (+ 1000 6) (cont 6))))) (+ (* (+ (call/cc r) 3) 8) (* (+ (call/cc r) 3) 8))) I have ran ...
anru 's user avatar
  • 1,397
0 votes
3 answers
522 views

Any way to "join" a currently-active Continuation in Kotlin Coroutines?

I feel like I'm close here. Let's say I have a method with a suspendCancellableCoroutine: (Sorry for any syntactical/etc. errors, just trying to get an idea down) suspend fun foo(): String { ...
Codepunk's user avatar
  • 218
1 vote
1 answer
81 views

Anything wrong with this simpler bind for Cont?

{-# LANGUAGE RankNTypes #-} newtype C a = C {runCont :: forall r. (a -> r) -> r} instance Functor C where fmap f (C arr) = C $ \br -> arr $ br . f instance Applicative C where pure ...
Adrian May's user avatar
  • 2,152
0 votes
0 answers
117 views

The request is canceled in Swift

Good afternoon! I ran into the following problem: there is an execute function. @available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) @discardableResult open func execute() async ...
Dasha Shevchenko's user avatar
0 votes
1 answer
653 views

Atlassian 1time TOTP - Java Implementation

I was attempting to implement this TOTP verification library created by Atlassian using java 1.8: Atlassian 1time totp library If I create a DefaultTOTPService, when I try to call any of its methods ...
Kachopsticks's user avatar
1 vote
2 answers
107 views

why is `(((call/cc (lambda (k) k)) (lambda (x) x)) "HEY!")` evaluated to "HEY!"?

I am reading The scheme programming language and seeing this example in continuation section: (((call/cc (lambda (k) k)) (lambda (x) x)) "HEY!") => "HEY!" I cannot figure out ...
happybzy's user avatar

15 30 50 per page
1
2 3 4 5
37