Skip to content

Console app. that monitors posts won't close #183

Description

@edhalsim

I'm monitoring a subreddit using:
subreddit.Posts.GetNew();
subreddit.Posts.NewUpdated += NewPostsUpdated;
subreddit.Posts.MonitorNew();

        // Stop monitoring subreddit for new posts.
        subreddit.Posts.MonitorNew();
        subreddit.Posts.NewUpdated -= NewPostsUpdated;

I'm also monitoring scoring, e.g.:
post.MonitorPostScore(minScoreMonitoringThreshold: 1);
post.PostScoreUpdated += PostScoreUpdated;

All this works, but when the app. should close (all code in Main is complete), it just sits there. It won't stop the app. I tried disposing any current threads, but that didn't help. I also tried keeping a list of all posts that I added the event handler to and I removed that, still won't terminate. Suggestions? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions