Skip to content

Commit

Permalink
Removed unused coroutinescope from the RoomLifeCycleManager
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Oct 22, 2024
1 parent 0460c5c commit 1f5623f
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions chat-android/src/main/java/com/ably/chat/RoomLifecycleManager.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package com.ably.chat

import io.ably.lib.types.ErrorInfo
import io.ably.lib.util.Log.LogHandler
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import io.ably.lib.realtime.Channel as AblyRealtimeChannel

/**
Expand Down Expand Up @@ -85,15 +83,6 @@ class RoomLifecycleManager
*/
private val _logger: LogHandler? = logger

/**
* sequentialCoroutineScope is to ensure the integrity and atomicity of operations that affect the room status, such as
* attaching, detaching, and releasing the room. It makes sure that we don't have multiple operations happening
* at once which could leave us in an inconsistent state.
* It is used as a CoroutineContext for with [kotlinx.coroutines.selects.select] statement.
* See [Kotlin Dispatchers](https://kt.academy/article/cc-dispatchers) for more information.
*/
private val sequentialCoroutineScope = CoroutineScope(Dispatchers.Default.limitedParallelism(1))

/**
* This flag indicates whether some sort of controlled operation is in progress (e.g. attaching, detaching, releasing).
*
Expand Down

0 comments on commit 1f5623f

Please sign in to comment.