TwitchLib.Api | API component of TwitchLib | REST library
kandi X-RAY | TwitchLib.Api Summary
kandi X-RAY | TwitchLib.Api Summary
API component of TwitchLib. For a general overview and example, refer to
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of TwitchLib.Api
TwitchLib.Api Key Features
TwitchLib.Api Examples and Code Snippets
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using TwitchLib.Api;
using TwitchLib.Api.Services;
using TwitchLib.Api.Services.Events;
using TwitchLib.Api.Services.Events.LiveStreamMonitor;
namespace Example
{
pub
Community Discussions
Trending Discussions on TwitchLib.Api
QUESTION
I use a async method to call an api to get a list of entries and fill a listbox with this data. This async method i want to call every 120 seconds. At this point it is necessary to cancel or restart the task to prevent memory leak right? I have no idea how to cancel or restart my task. Do you have any idea to figure this out? Here my Method:
...ANSWER
Answered 2019-Apr-21 at 20:41You can't cancel "the task" because your API is not cancellable.
A task, by itself, will not cause that much memory leakage. But your recursive algorithm will cause memory leakeage because it will keep those tasks and the state machine generated by the compiler alive.
You should also use Task.Run
instead of Task.Factory.StartNew
with async-await
.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install TwitchLib.Api
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page