Skip to content

Simple sample crashes #6

@Kerstin-Keller

Description

@Kerstin-Keller

The following sample currently crashes on Windows in Release configuration

// Copyright (c) Continental. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

#include <iostream>
#include <thread>

#include <tcp_pubsub/executor.h>
#include <tcp_pubsub/publisher.h>
#include <tcp_pubsub/subscriber.h>

int main()
{
    std::shared_ptr<tcp_pubsub::Executor> executor = std::make_shared<tcp_pubsub::Executor>(4);

    int counter = 0;

    tcp_pubsub::Publisher hello_world_publisher(executor, 1588);
    tcp_pubsub::Subscriber hello_world_subscriber(executor);

    std::cout << "Hello tcp_pubsub!" << std::endl;

    return 0;
}

image

In debug, or if one inserts a sleep before the return, it executes fine.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions