Skip to content

Commit 8bc0669

Browse files
authored
docs: Make GeoApiContext shutdown() more prominent in code snippet. (#737)
1 parent 28197a4 commit 8bc0669

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,12 @@ GeocodingResult[] results = GeocodingApi.geocode(context,
141141
"1600 Amphitheatre Parkway Mountain View, CA 94043").await();
142142
Gson gson = new GsonBuilder().setPrettyPrinting().create();
143143
System.out.println(gson.toJson(results[0].addressComponents));
144+
145+
// Invoke .shutdown() after your application is done making requests
146+
context.shutdown()
144147
```
145148

146-
The `GeoApiContext` is designed to be a [Singleton](https://en.wikipedia.org/wiki/Singleton_pattern)
149+
**Note:** The `GeoApiContext` is designed to be a [Singleton](https://en.wikipedia.org/wiki/Singleton_pattern)
147150
in your application. Please instantiate one on application startup, and continue to use it for the
148151
life of your application. This will enable proper QPS enforcement across all of your requests.
149152

0 commit comments

Comments
 (0)