Skip to content

Commit

Permalink
chore: Update callback to match spec
Browse files Browse the repository at this point in the history
  • Loading branch information
jondthomas committed Oct 3, 2023
1 parent 82647cc commit 6b7c930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/buffy/throttle.ex
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ defmodule Buffy.Throttle do
@type state :: {key(), args()}

@doc """
A function to call the throttle. This will always return a tuple of `{:ok, pid()}`
A function to call the throttle. This will start
and wait the configured `throttle` time before calling the `c:handle_throttle/1`
function.
"""
@callback throttle(args :: args()) :: {:ok, pid()}
@callback throttle(args :: args()) :: :ok | {:error, term()}

@doc """
The function called after the throttle has completed. This function will
Expand Down

0 comments on commit 6b7c930

Please sign in to comment.