Skip to content

Commit

Permalink
RUM-3670 code review feedbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
xgouchet committed Mar 26, 2024
1 parent a298751 commit 707aa84
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import com.datadog.android.core.thread.FlushableExecutorService
import java.util.concurrent.ThreadPoolExecutor
import java.util.concurrent.TimeUnit

/**
* A single threaded executor service using a BackPressureStrategy.
*/
internal class BackPressureExecutorService(
val logger: InternalLogger,
backpressureStrategy: BackPressureStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ package com.datadog.android.core.thread

import com.datadog.android.api.InternalLogger
import com.datadog.android.core.configuration.BackPressureStrategy
import com.datadog.android.lint.InternalApi
import java.util.concurrent.ExecutorService

/**
* An [ExecutorService] which backing queue can be drained to a collection.
*
*/
@InternalApi
interface FlushableExecutorService : ExecutorService {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class DropOldestBackPressuredBlockingQueueTest {

// When
Thread {
// PutInserts the specified element into this queue, waiting if necessary for space to become available.
// put() inserts the specified element into this queue, waiting if necessary for space to become available.
// In order to not wait indefinitely, we need to remove an element
sleep(100)
testedQueue.take()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ class IgnoreNewestBackPressuredBlockingQueueTest {

// When
Thread {
// PutInserts the specified element into this queue, waiting if necessary for space to become available.
// put() inserts the specified element into this queue, waiting if necessary for space to become available.
// In order to not wait indefinitely, we need to remove an element
sleep(100)
testedQueue.take()
Expand Down

0 comments on commit 707aa84

Please sign in to comment.