Skip to content

Commit

Permalink
Removed unused coroutinescope from the RoomLifeCycleManager, added mi…
Browse files Browse the repository at this point in the history
…ssing

attach suspending method
  • Loading branch information
sacOO7 committed Oct 22, 2024
1 parent 0460c5c commit 2c3655a
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 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 All @@ -115,4 +104,8 @@ class RoomLifecycleManager
}
// TODO - [CHA-RL4] set up room monitoring here
}

suspend fun attach() {
TODO("Not yet implemented")
}
}

0 comments on commit 2c3655a

Please sign in to comment.