Package dev. inmo. micro_utils. coroutines
Types
This Flow will have behaviour very similar to SharedFlow, but there are several differences:
This Flow will have behaviour very similar to SharedFlow, but there are several differences:
This Flow will have behaviour very similar to SharedFlow, but there are several differences:
ExceptionHandler wrapper which was created to make possible to use handler across all coroutines calls
ExceptionHandler wrapper which was created to make possible to use handler across all coroutines calls
ExceptionHandler wrapper which was created to make possible to use handler across all coroutines calls
This key can (and will) be used to get ContextSafelyExceptionHandler from coroutineContext of suspend functions and in ContextSafelyExceptionHandler for defining of its CoroutineContext.Element.key
This key can (and will) be used to get ContextSafelyExceptionHandler from coroutineContext of suspend functions and in ContextSafelyExceptionHandler for defining of its CoroutineContext.Element.key
This key can (and will) be used to get ContextSafelyExceptionHandler from coroutineContext of suspend functions and in ContextSafelyExceptionHandler for defining of its CoroutineContext.Element.key
Functions
Creates AccumulatorFlow using this with receiveAsFlow to get
Creates AccumulatorFlow using this as base Flow
Creates AccumulatorFlow using this with receiveAsFlow to get
Creates AccumulatorFlow using this as base Flow
Creates AccumulatorFlow using this with receiveAsFlow to get
Creates AccumulatorFlow using this as base Flow
Planned to use with doWithSuspending. Will execute incoming lambdas sequentially
Planned to use with doWithSuspending. Will execute incoming lambdas sequentially
Planned to use with doWithSuspending. Will execute incoming lambdas sequentially
Planned to use with doWithSuspending. Will execute incoming lambdas sequentially
Planned to use with doWithSuspending. Will execute incoming lambdas sequentially
Planned to use with doWithSuspending. Will execute incoming lambdas sequentially
Call this method in case you need to do something in common thread (like reading of file in JVM)
Call this method in case you need to do something in common thread (like reading of file in JVM)
Call this method in case you need to do something in common thread (like reading of file in JVM)
Must be use with actor created by createActionsActor or createSafeActionsActor. Will send lambda which will execute action and return result.
Must be use with actor created by createActionsActor or createSafeActionsActor. Will send lambda which will execute action and return result.
Must be use with actor created by createActionsActor or createSafeActionsActor. Will send lambda which will execute action and return result.
It will run block inside of supervisorScope to avoid problems with catching of exceptions
This method will set new coroutineContext with ContextSafelyExceptionHandler. In case if coroutineContext already contains ContextSafelyExceptionHandler, ContextSafelyExceptionHandler.handler will be used BEFORE contextExceptionHandler in case of exception.
This method will set new coroutineContext with ContextSafelyExceptionHandler. In case if coroutineContext already contains ContextSafelyExceptionHandler, ContextSafelyExceptionHandler.handler will be used BEFORE contextExceptionHandler in case of exception.
This method will set new coroutineContext with ContextSafelyExceptionHandler. In case if coroutineContext already contains ContextSafelyExceptionHandler, ContextSafelyExceptionHandler.handler will be used BEFORE contextExceptionHandler in case of exception.
Shortcut for safely with exception handler, that as expected must return null in case of impossible creating of result from exception (instead of throwing it, by default always returns null)
Shortcut for safely with exception handler, that as expected must return null in case of impossible creating of result from exception (instead of throwing it, by default always returns null)
Shortcut for safely with exception handler, that as expected must return null in case of impossible creating of result from exception (instead of throwing it, by default always returns null)
Shortcut for chain if Flow.onEach and Flow.launchIn
Use subscribe, but all blocks will be called inside of safely function. Use onException to set up your reaction for Throwables
Use subscribe, but all blocks will be called inside of safely function. Use onException to set up your reaction for Throwables
Use subscribe, but all blocks will be called inside of safely function. Use onException to set up your reaction for Throwables
Use subscribeSafelyWithoutExceptions, but all exceptions inside of safely will be skipped
Use subscribeSafelyWithoutExceptions, but all exceptions inside of safely will be skipped
Use subscribeSafelyWithoutExceptions, but all exceptions inside of safely will be skipped
Use subscribeSafelyWithoutExceptions, but all exceptions will be passed to defaultSafelyExceptionHandler
Use subscribeSafelyWithoutExceptions, but all exceptions will be passed to defaultSafelyExceptionHandler
Use subscribeSafelyWithoutExceptions, but all exceptions will be passed to defaultSafelyExceptionHandler
Properties
This instance will be used in all calls of safelyWithoutExceptions as an exception handler for safely call
This instance will be used in all calls of safelyWithoutExceptions as an exception handler for safely call
This instance will be used in all calls of safelyWithoutExceptions as an exception handler for safely call
Use this handler in cases you wish to include handling of exceptions by defaultSafelyWithoutExceptionHandler and returning null at one time
Use this handler in cases you wish to include handling of exceptions by defaultSafelyWithoutExceptionHandler and returning null at one time
Use this handler in cases you wish to include handling of exceptions by defaultSafelyWithoutExceptionHandler and returning null at one time