Skip to content

Commit

Permalink
docs: Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
John Doe committed Oct 22, 2023
1 parent 7d0fd9a commit 038cb7f
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,24 @@ rongcloud = RongCloud::Client.new(
)
```

### Thread Safe

```ruby
rongcloud = RongCloud::Client.new(
app_key: ENV["RONGCLOUD_APP_KEY"],
app_secret: ENV["RONGCLOUD_APP_SECRET"],
host: "api-cn.ronghub.com"
)

# RongCloud::Client is thread-safe.
thrs = []
thrs << Thread.new { rongcloud.api.user.gettoken(userId: 'nutzer') }
thrs << Thread.new { rongcloud.api.user.gettoken(userId: 'nutzer') }
thrs << Thread.new { rongcloud.api.user.gettoken(userId: 'nutzer') }
thrs << Thread.new { rongcloud.api.user.gettoken(userId: 'nutzer') }
thrs.each(&:join)
```

### Signature Verify

```ruby
Expand Down

0 comments on commit 038cb7f

Please sign in to comment.